Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bazelrc: set java_runtime_version for builds too (#5836)
Otherwse, if the default Java version on the host is "lower" (in my case, 11), the following happens: ``` $ bazel build //base:integration_tests --define=ij_product=intellij-2023.3 ERROR: /home/motiejus/code/intellij/base/BUILD:535:32: Building base/integration_tests.jar (72 source files) failed: (Exit 1): java failed: error executing Javac command (from target //base:integration_tests) external/remotejdk17_linux/bin/java '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' ... (remaining 19 arguments skipped) base/tests/integrationtests/com/google/idea/blaze/base/lang/buildfile/search/GlobalWordIndexTest.java:81: warning: [removal] SERVICE in CacheManager has been deprecated and marked for removal CacheManager.SERVICE ^ base/tests/integrationtests/com/google/idea/blaze/base/lang/buildfile/references/BuildReferenceManagerTest.java:47: error: cannot find symbol .toList(); ^ symbol: method toList() location: interface Stream<String> base/tests/integrationtests/com/google/idea/blaze/base/lang/buildfile/references/BuildReferenceManagerTest.java:68: error: cannot find symbol .toList(); ^ symbol: method toList() location: interface Stream<String> Use --verbose_failures to see the command lines of failed build steps. ``` However, `bazel test` with the same arguments succeeds. The current behaviour is "technically" correct, but is a confusing: we should be able to build our tests, not only run them. Fixes #5835
- Loading branch information