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

Getters and Setters can now be activated independently #759

Merged
merged 3 commits into from
Jul 24, 2017
Merged

Getters and Setters can now be activated independently #759

merged 3 commits into from
Jul 24, 2017

Conversation

lstav
Copy link
Contributor

@lstav lstav commented Jul 18, 2017

Made it possible for getters and setters to be activated independently. I am not sure that I did the dynamic setters/getters correctly, so any feedback will be appreciated. I would also like feedback on the testing.

@joelittlejohn
Copy link
Owner

joelittlejohn commented Jul 19, 2017

Thanks for submitting this PR @lstav. It looks like you have been very thorough.

One issue here is that you have removed the existing config option, and I can see why - it's not easy to make these play nicely together, particularly considering the default values. We may only be able to include this in a 1.0 release.

I wonder if we can find a way to include this but keep the includeAccessors option. We can even deprecate it.

So, add getters when:

isIncludeAccessors() || isIncludeGetters()

And add setters when:

isIncludeAccessors() || isIncludeSetters()

This way we maintain the old behaviour but can support your new features too.

@lstav
Copy link
Contributor Author

lstav commented Jul 19, 2017

@joelittlejohn Sounds good, I'll add those and update the PR.

@lstav
Copy link
Contributor Author

lstav commented Jul 19, 2017

@joelittlejohn Just added the accessor methods again, let me know if this is what you were expecting. Also, I wasn't sure if I should put @deprecated on the accessor methods, or if we would just add them later.

@joelittlejohn
Copy link
Owner

joelittlejohn commented Jul 23, 2017

I think includeGetters and includeSetters should be default false. This way, users who are currently using includeAccessors = false will not have getters/setters appear in their code after this change.

@lstav
Copy link
Contributor Author

lstav commented Jul 24, 2017

I agree, that's a good idea, I just pushed the changes.

@joelittlejohn joelittlejohn added this to the 0.4.38 milestone Jul 24, 2017
@joelittlejohn joelittlejohn merged commit 97e6271 into joelittlejohn:master Jul 24, 2017
@lstav lstav deleted the issue640 branch July 24, 2017 15:29
@joelittlejohn joelittlejohn modified the milestones: 0.5.0, 0.4.38 Sep 11, 2017
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