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

ensure method param names #25

Merged
merged 4 commits into from
Nov 17, 2023
Merged

ensure method param names #25

merged 4 commits into from
Nov 17, 2023

Conversation

drshriveer
Copy link
Owner

@drshriveer drshriveer commented Nov 17, 2023

Background

→ I ran into two issues with method parameter names:

  1. names between input and outputs will conflict if not already named.
  2. we do not ensure that fields are named prior to operations may change the size of a parameter list we operate on, and thus cause even the same parameter list to contain conflicting names.

Changes

  • always pre-populate method parameter names.
  • method returns variables if undefined are prefixed 'ret', inputs are prefixed 'arg'
  • use of map to ensure no conflicts.
  • attempt to use name 'ctx' for first argument in a function that implements Context.
  • attempt to use name 'err' for last argument in function response that implements Error.

Testing

  • added minimal testing; this will be verified against stately in tests I cannot codify here.

@drshriveer drshriveer merged commit 2d1ce4e into main Nov 17, 2023
3 checks passed
@drshriveer drshriveer deleted the gs/some-changes-and-cleanup branch November 17, 2023 07:32
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