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

Annotate localizer generated Messages classes with NoExternalUse #2656

Merged

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Dec 6, 2016

Also update to localizer 1.24 which adds support for this.

Using another component's Messages is brittle and always risky, so let's make sure anyone with a recent enough core dependency and using the access-modifier-checker gets an error during build.

This will not break plugins at runtime, just make sure they don't reuse core Messages during build. In time, reuse should fade as core dependencies get updated.

Also update to localizer 1.24 which adds support for this.
@oleg-nenashev
Copy link
Member

👍

@daniel-beck daniel-beck added the needs-more-reviews Complex change, which would benefit from more eyes label Dec 6, 2016
@KostyaSha
Copy link
Member

Wouldn't this enforce people to copy-paste information?

@daniel-beck
Copy link
Member Author

@KostyaSha Depends. I don't expect there to be a lot of reuse of strings, and past experience points to plugins breaking because nobody really considers Messages.properties to be public (stable) API – similar to doWhatever methods that change signature depending on need e.g. to add a StaplerRequest argument. So I prefer to be cautious to prevent unnecessary breakage rather than trying to micro-optimize something.

@KostyaSha
Copy link
Member

Yes it makes sense. What about help files? i'm using them i.e. for slave description.

@daniel-beck
Copy link
Member Author

@KostyaSha I wouldn't rely too much on those either, at least unless they're based on public non-Restricted databound fields with the default naming convention. In that case, I'd say you're pretty safe from changes.

And FWIW the worst that happens there is that the Jenkins UI displays an error. With Messages (and implicit web methods), it's runtime exceptions and brokenness.

Copy link
Member

@KostyaSha KostyaSha left a comment

Choose a reason for hiding this comment

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

let's try it could be reverted any time

@daniel-beck daniel-beck merged commit 7292c91 into jenkinsci:master Dec 9, 2016
oleg-nenashev added a commit that referenced this pull request Dec 11, 2016
froque added a commit to froque/parameterized-trigger-plugin that referenced this pull request Oct 17, 2019
Remove jenkins.version 1.642.3 to use implicit version 2.138.4

corrections due to changes in jenkins core:
jenkinsci/jenkins#2656
jenkinsci/jenkins#3106
oleg-nenashev pushed a commit to jenkinsci/parameterized-trigger-plugin that referenced this pull request Jun 12, 2020
…130)

* Upgrade parent POM to version 3.50
Remove jenkins.version 1.642.3 to use implicit version 2.138.4

corrections due to changes in jenkins core:
jenkinsci/jenkins#2656
jenkinsci/jenkins#3106

* upgrade promoted-builds to 3.4

upgrade other plugins to satisfy enforcer:
subversion 2.12.2
matrix-project 1.14
script-security 1.54
token-macro 2.0

* correction due to method renamed in promoted-builds-plugin

See:
https://issues.jenkins-ci.org/browse/JENKINS-59704
https://issues.jenkins-ci.org/browse/JENKINS-59600
https://issues.jenkins-ci.org/browse/JENKINS-58337
jenkinsci/promoted-builds-plugin#140

* Bump promoted-builds to version 3.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-reviews Complex change, which would benefit from more eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants