-
Notifications
You must be signed in to change notification settings - Fork 662
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
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
From #1947: rename almost all references of
CompilationUnit
to singular.