Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Functions and other Code Slimming Features #253

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ericanderson
Copy link
Member

@ericanderson ericanderson commented Mar 7, 2023

Note: This PR is broken into two commits: one for the actual changes and one for a ton of fixture changes. You will likely want to review them separately. The fixture changes will mostly just require skimming.

This change causes all services to generate functions of the format ServiceName_endpointMethodName that take signature of the call method of the bridge AND the remaining args as their ServiceName['endpointMethodName'] counterparts do.

These new functions also leverage a tuple spread for better minification.

This PR further adds command line flags to the generator:

  • --omitServiceMetadata : Instead of generating "ServiceName", "EndpointName" as the first to arguments to all bridge calls, this flag will cause empty strings to be passed instead.
  • --omitUnnecessaryArgs : Cause the same size reduction for service class methods that functions get.
  • --omitServiceClasses : Skip generating service classes and interfaces

@changelog-app
Copy link

changelog-app bot commented Mar 7, 2023

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Generate Functions and other Code Slimming Features

This change causes all services to generate functions of the format ServiceName_endpointMethodName that take signature of the call method of the bridge AND the remaining args as their ServiceName['endpointMethodName'] counterparts do.

These new functions also leverage a tuple spread for better minification.

This PR further adds command line flags to the generator:

  • --omitServiceMetadata : Instead of generating "ServiceName", "EndpointName" as the first to arguments to all bridge calls, this flag will cause empty strings to be passed instead.
  • --omitUnnecessaryArgs : Cause the same size reduction for service class methods that functions get.
  • --omitServiceClasses : Skip generating service classes and interfaces

Check the box to generate changelog(s)

  • Generate changelog entry

@ericanderson ericanderson force-pushed the ericanderson/generate-functions branch from 3c90528 to 0ffa4d6 Compare March 7, 2023 16:28
@ericanderson ericanderson force-pushed the ericanderson/generate-functions branch from 0ffa4d6 to 71b4604 Compare March 7, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant