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

Rename all singular CompilationUnit references to singular #1951

Merged
merged 2 commits into from
Jan 28, 2020

Conversation

louis993546
Copy link
Contributor

From #1947: rename almost all references of CompilationUnit to singular.

Copy link
Contributor

@tasomaniac tasomaniac left a comment

Choose a reason for hiding this comment

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

Great! Thanks for contribution

* The apollo plugin will add the {@link CompilationUnit} as it creates them
*/
internal val compilationUnits = project.container(CompilationUnit::class.java)
internal val compilationUnit = project.container(CompilationUnit::class.java)
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is a container (which extends from Set) and internal. I think we should keep this one plural.

Copy link
Contributor

@martinbonnin martinbonnin Jan 27, 2020

Choose a reason for hiding this comment

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

+1


override fun onCompilationUnits(action: Action<CompilationUnit>) {
compilationUnits.all(action)
Copy link
Contributor

Choose a reason for hiding this comment

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

What about keeping the old one and doing:

 fun onCompilationUnits(action: Action<CompilationUnit>) {
    throw Exception("please use onCompilationUnit {} instead")  
}

And then we remove that old version in a couple of months ? This API is new from 1.3.0 so presumably not that many people are using it but that'll make a nicer deprecation path for the users that use it.

*
* Please see [onCompilationUnit]
*/
@Deprecated("There is a typo. Please use onCompilationUnit instead", replaceWith = ReplaceWith("onCompilationUnit"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 👍

@martinbonnin martinbonnin merged commit a2fdc59 into apollographql:master Jan 28, 2020
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.

3 participants