-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Share classpath NestedSet
between full and header compile actions
#21343
Conversation
The Starlark Java rules already add the direct JARs to the transitive classpath depset and pass the same depset to the full and the header compile action. By allowing them to bypass the logic that prepends the direct jars to the compile-time classpath, both actions retain the same `NestedSet` instead of both retaining a new one with identical elements.
ad0fc99
to
284d904
Compare
NestedSet
between full and header compile actionsNestedSet
between full and header compile actions
@hvadehra If that information is easy to get, I would be very interested in learning how much memory this saves to help build up my intuition. |
@bazel-io fork 7.1.0 |
Sure, I'll report back shortly. |
Going by the numbers in #19872 (comment), looks like this saves ~20 bytes / javac action |
Confirming, it's about 4MB (0.1%) for the benchmark target from #19872 (comment). |
The Starlark Java rules already add the direct JARs to the transitive classpath depset and pass the same depset to the full and the header compile action. By allowing them to bypass the logic that prepends the direct jars to the compile-time classpath, both actions retain the same `NestedSet` instead of both retaining a new one with identical elements. Closes bazelbuild#21343. PiperOrigin-RevId: 607790056 Change-Id: Ia08c834ae3e5b1151607459408cdfea85d47314f
…ctions (#21389) The Starlark Java rules already add the direct JARs to the transitive classpath depset and pass the same depset to the full and the header compile action. By allowing them to bypass the logic that prepends the direct jars to the compile-time classpath, both actions retain the same `NestedSet` instead of both retaining a new one with identical elements. Closes #21343. Commit 31fae9e PiperOrigin-RevId: 607790056 Change-Id: Ia08c834ae3e5b1151607459408cdfea85d47314f Co-authored-by: Fabian Meumertzheim <[email protected]>
The changes in this PR have been included in Bazel 7.1.0 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc. |
The Starlark Java rules already add the direct JARs to the transitive classpath depset and pass the same depset to the full and the header compile action. By allowing them to bypass the logic that prepends the direct jars to the compile-time classpath, both actions retain the same
NestedSet
instead of both retaining a new one with identical elements.