-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Refactor BuildChainBuilder #36696
Refactor BuildChainBuilder #36696
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
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.
LGTM
Thanks for looking at this. These are good cleanups; I was a bit rushed when it was first written ;) |
@@ -24,8 +24,8 @@ public final class BuildExecutionBuilder { | |||
BuildExecutionBuilder(final BuildChain buildChain, final String buildTargetName) { | |||
this.buildChain = buildChain; | |||
this.buildTargetName = buildTargetName; | |||
initialSingle = new HashMap<>(buildChain.getInitialSingleCount()); | |||
initialMulti = new HashMap<>(buildChain.getInitialMultiCount()); | |||
initialSingle = new HashMap<>(); |
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.
Just a question, why not use the known capacity?
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.
Those 2 variable were initialized to 0 here, never touched again during the graph linearization algorithm, inserted in the buildChain
result (still always with value 0) here and then read to initialize the size of the maps were you pointed. In essence those maps were always initialized with capacity 0.
Failing Jobs - Building 2823db7
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 17 Windows #- Failing: extensions/vertx-http/deployment
! Skipped: devtools/cli extensions/agroal/deployment extensions/amazon-lambda-http/deployment and 364 more 📦 extensions/vertx-http/deployment✖
✖
⚙️ Maven Tests - JDK 11 Windows #📦 integration-tests/maven✖
✖
✖
✖
✖
✖
✖
✖
|
I'm studying how the BuildChainBuilder works in order to document it and while doing so I found some inefficiency and dead code. I also refactored it a bit hoping to improve readability.
/cc @dmlloyd @franz1981 @geoand @maxandersen