Enhance stack trace information for rule conflicts in BuildManager#2279
Enhance stack trace information for rule conflicts in BuildManager#2279vogella wants to merge 2 commits intoeclipse-platform:masterfrom
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.
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.