-
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
Add --experimental_java_classpath=bazel_no_fallback
option
#24876
base: master
Are you sure you want to change the base?
Conversation
does this mean that the change would need to be back-compatible with versions of |
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 left some notes in the bug
classpathLine.add("--reduce_classpath_mode", fallback ? "BAZEL_FALLBACK" : "BAZEL_REDUCED"); | ||
classpathLine.add("--reduce_classpath_mode", | ||
fallback ? "BAZEL_FALLBACK" | ||
: (classpathMode == JavaClasspathMode.BAZEL ? "BAZEL_REDUCED" : "BAZEL_REDUCED_NO_FALLBACK")); |
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.
Instead of adding the new --reduce_classpath_mode=BAZEL_REDUCED_NO_FALLBACK
mode, did you consider having Bazel invoke JavaBuilder with a reduced classpath and pass --reduce_classpath_mode=NONE
, and then handle not doing fallback on the Bazel side? I think that would provide equivalent behaviour without JavaBuilder changes.
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.
Thx, that's much better. Pushed the change.
There is still 1 test failure, but seems unrelated to the change:
test_size_less_than_385MB FAILED: terminated because this command returned a non-zero status:
/private/var/tmp/_bazel_buildkite/1198ee8566c303641c6d358da6949c16/sandbox/darwin-sandbox/4799/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/src/test/shell/integration/minimal_jdk_test.runfiles/_main/src/test/shell/integration/minimal_jdk_test:50: in call to test_size_less_than_385MB
…classpath_mode=NONE
This change introduces a new option,
--experimental_java_classpath=bazel_no_fallback
, which operates similarly to--experimental_java_classpath=bazel
but does not fall back to the full transitive classpath. Instead, the build fails if javac cannot compile with the reduced classpath.Fixes #24875