-
Notifications
You must be signed in to change notification settings - Fork 148
Enhance stack trace information for rule conflicts in BuildManager #2279
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
base: master
Are you sure you want to change the base?
Enhance stack trace information for rule conflicts in BuildManager #2279
Conversation
e5b4927 to
b906eae
Compare
f754b17 to
02578f4
Compare
Fixes eclipse-platform#2278 When a builder attempts to begin or end a scheduling rule that doesn't match the outer scope rule, the error message now includes: - Builder name and label - Builder class name - Plugin ID - Project name - The conflicting rule This makes it much easier to identify which builder is causing the rule mismatch, especially in complex build scenarios with multiple builders. The enhancement catches IllegalArgumentException at the point where beginRule() and endRule() are called in BuildManager.basicBuild() and wraps it with detailed context before re-throwing.
02578f4 to
d4e060e
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
| // Acquire the rule required for running this builder | ||
| if (rule != null) { | ||
| Job.getJobManager().beginRule(rule, monitor); | ||
| try { |
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.
Looks like two blocks differ only in string arguments. Can you please extract them to a static method handleRuleConflicts(boolean beginRule, InternalBuilder currentBuilder, IllegalArgumentException e)?
Could you please also add some example or just a test how the result error would look like?
Fixes #2278
When a builder attempts to begin or end a scheduling rule that doesn't match the outer scope rule, the error message now includes:
This makes it much easier to identify which builder is causing the rule mismatch, especially in complex build scenarios with multiple builders.
The enhancement catches IllegalArgumentException at the point where beginRule() and endRule() are called in BuildManager.basicBuild() and wraps it with detailed context before re-throwing.