-
Notifications
You must be signed in to change notification settings - Fork 103
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
[JENKINS-39414] - Stapler 1.246 Binary Incompatibility. Part 2 #88
[JENKINS-39414] - Stapler 1.246 Binary Incompatibility. Part 2 #88
Conversation
Required at least for tests, seems to be useful in general
…ns in KlassNavigator
🐝 |
// TODO: what to do with Logging? The error must be VERY visible, but it will totally pollute system logs | ||
return Collections.emptyList(); | ||
} | ||
return navigator.getDeclaredFields(clazz); |
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.
IMHO we need to test this change. You removed the try catch, but are sure that getDeclaredFields never throws an exception?
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.
It was a hack in #85 in order to suppress the binary compatibility issue. Now we solve it by providing default implementations in KlassNavigator
. Hence this AbstractMethodError
handler is no longer required
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
@oleg-nenashev ok thanks for the clarification 🐝 |
@reviewbybees done |
This pull request has completed our internal processes and we now respectfully request the maintainers of this repository to consider our proposal contained within this pull request for merging. |
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.
🐝
* @param clazz Class | ||
* @return List of the fields functions declared for the class. | ||
* By default this list is empty, {@link KlassNavigator} implementations are responsible to implement it. | ||
* @since 1.246 |
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.
BTW getDeclaredMethods
was also added as abstract
somewhat recently (1.220), but I suppose if this caused problems we would have hit them long since.
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.
Yes, I decided not to touch that code. Ruby Runtime has a dep on a greater version
* @since 1.248 | ||
*/ | ||
@CheckForNull | ||
public String getName() { |
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.
Is there a proposed caller for this, or is it just KlassTest
?
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.
I think this API is generally useful, e.g. for diagnostic purposes. Right now just in KlassTest
and RubyKlassNavigatorTest
. The latter one is supposed to be an external lib.
MyRubyClass(Ruby runtime) { | ||
super(runtime); | ||
} | ||
} |
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.
Gratuitous whitespace changes.
FTR this corrects a regression introduced in #77. jenkinsci/ruby-runtime-plugin#4 or its port to |
1.247 didn't fix the issue completely, because there was another incompatible method (
getFunctions()
), which I have missed somehow.This change intends to solve the binary compat issue:
KlassNavigator
methods introduced in 1.246KlassNavigator#getFunctions()
KlassNavigator#getDEclaredMethods()
(generally was not required for this PR)I've verified that Ruby Runtime plugin starts correctly and shows UIs without errors in System logs after the fix.
https://issues.jenkins-ci.org/browse/JENKINS-39414
@reviewbybees