Skip to content

Fix bug with enum closure parameter #181

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

Merged
merged 2 commits into from
May 24, 2018
Merged

Fix bug with enum closure parameter #181

merged 2 commits into from
May 24, 2018

Conversation

kevmoo
Copy link
Collaborator

@kevmoo kevmoo commented May 24, 2018

No description provided.

@@ -1,4 +1,4 @@
## 0.5.5
## 0.5.4+1

* Added named `formatOutput` parameter to `jsonPartBuilder`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a parameter (A feature someone can depend on) should be done in a minor release, not a bug fix release. The previous version in this file was better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er, uh. Yup. Will fix.

...although the named arg will be useful to very few people. But fair...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went the other way and removed the changelog entry – jsonPartBuilder is not public!

@@ -34,6 +34,11 @@ class EnumHelper extends TypeHelper {
var wrappedExpression =
simpleExpression.hasMatch(expression) ? expression : '{$expression}';

var closureArg = consts.closureArg;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so was the import unused before? How is it that you could add a prefix without changing any other lines?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't unused before. I'm creating a local var that maps exactly to the field closureArg. This way the code that does the generation doesn't change at all...

Remove changelog entry about change to `jsonPartBuilder` – internal API
@kevmoo kevmoo force-pushed the i180_enum_silly branch from 7e67a53 to 68b3f24 Compare May 24, 2018 23:44
@kevmoo kevmoo merged commit 68b3f24 into master May 24, 2018
@kevmoo kevmoo deleted the i180_enum_silly branch May 24, 2018 23:47
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.

2 participants