Skip to content
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

java_tools tests don't pass on Windows #4165

Closed
davido opened this issue Nov 25, 2017 · 7 comments
Closed

java_tools tests don't pass on Windows #4165

davido opened this issue Nov 25, 2017 · 7 comments
Labels
area-Windows Windows-specific issues and feature requests platform: windows team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website under investigation untriaged

Comments

@davido
Copy link
Contributor

davido commented Nov 25, 2017

On bazel@HEAD:

$ bazel test src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest -s --verbose_failures
Loading:
Loading: 0 packages loaded
INFO: Analysed target //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest (0 packages loaded).
INFO: Found 1 test target...
[0 / 2] BazelWorkspaceStatusAction stable-status.txt
SUBCOMMAND: # //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest [action 'Testing //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest']
cd C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel
  SET JAVA_RUNFILES=bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe.runfiles
    SET PATH=C:\msys64\usr\bin;C:\msys64\bin;C:\Users\davido\pgm\nodejs;C:\Users\davido\AppData\Roaming\npm;C:\Python36;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\usr\bin;C:\msys64\opt\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\msys64\usr\bin\site_perl;C:\msys64\usr\bin\vendor_perl;C:\msys64\usr\bin\core_perl
    SET PYTHON_RUNFILES=bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe.runfiles
    SET RUNFILES_DIR=bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe.runfiles
    SET RUNFILES_MANIFEST_ONLY=1
    SET RUN_UNDER_RUNFILES=1
    SET TEMP=C:\Users\davido\AppData\Local\Temp
    SET TEST_BINARY=src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe
    SET TEST_INFRASTRUCTURE_FAILURE_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.infrastructure_failure
    SET TEST_LOGSPLITTER_OUTPUT_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.raw_splitlogs/test.splitlogs
    SET TEST_PREMATURE_EXIT_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.exited_prematurely
    SET TEST_SIZE=medium
    SET TEST_SRCDIR=bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe.runfiles
    SET TEST_TIMEOUT=300
    SET TEST_TMPDIR=_tmp/be0e05b7bca0f645bc898e36ab614213
    SET TEST_UNDECLARED_OUTPUTS_ANNOTATIONS=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs_manifest/ANNOTATIONS
    SET TEST_UNDECLARED_OUTPUTS_ANNOTATIONS_DIR=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs_manifest
    SET TEST_UNDECLARED_OUTPUTS_DIR=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs
    SET TEST_UNDECLARED_OUTPUTS_MANIFEST=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs_manifest/MANIFEST
    SET TEST_UNDECLARED_OUTPUTS_ZIP=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.outputs/outputs.zip
    SET TEST_UNUSED_RUNFILES_LOG_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.unused_runfiles_log
    SET TEST_WARNINGS_OUTPUT_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.warnings
    SET TEST_WORKSPACE=io_bazel
    SET TMP=C:\Users\davido\AppData\Local\Temp
    SET TZ=UTC
    SET XML_OUTPUT_FILE=bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.xml
  C:/msys64/usr/bin/bash.exe -c $0 $* external/bazel_tools/tools/test/test-setup.sh src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe
[1 / 2] 1 / 1 tests, 1 failed; Testing //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest; 1s local
FAIL: //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest (see C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel/bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.log)
Target //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest up-to-date:
  C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel/bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.jar
  C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel/bazel-out/x64_windows-fastbuild/bin/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.exe
INFO: Elapsed time: 2,279s, Critical Path: 1,50s
INFO: Build completed, 1 test FAILED, 2 total actions
//src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest FAILED in 1,5s
  C:/msys64/tmp/_bazel_davido/e7lhz0a0/execroot/io_bazel/bazel-out/x64_windows-fastbuild/testlogs/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest/test.log

Executed 1 out of 1 test: 1 fails locally.

Logs: http://paste.openstack.org/show/627381.

It seems, that jvm_flags doesn't have the desired effect on Windows, and -Xbootclasspath/p:<path-to-java9> option doesn't have effect and that the default javac from Java 8 is used.

    jvm_flags = [
        # Simulates how Bazel invokes turbine
        "-Xbootclasspath/p:$(location //third_party/java/jdk/langtools:javac_jar)",
    ],

The same test is passing on Linux without any issue.

@laszlocsomor
Copy link
Contributor

Thanks for filing this issue. I could also repro it.

I agree the problem seems to be caused by the boot class path:

    jvm_flags = [
        # Simulates how Bazel invokes turbine
        "-Xbootclasspath/p:$(location //third_party/java/jdk/langtools:javac_jar)",
    ],

Bazel propagates the jvm flags to the java launcher (good), but the $(location) expansion yields the runfiles path (third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar) which doesn't exist on Windows, because Bazel doesn't create runfiles on Windows.

$(location) should expand to the actual path of the runfile. I'll create a separate bug about that.

Temporarily hardcoding the absolute path in the BUILD file doesn't fix the test, but makes it fail later, giving the impression of progress.

@laszlocsomor
Copy link
Contributor

laszlocsomor commented Nov 27, 2017

I added debugging info to src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java:

diff --git a/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java b/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java
index 6c24a73..151199e 100644
--- a/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java
+++ b/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java
@@ -88,6 +88,8 @@ public class JavacTurbineTest extends AbstractJavacTurbineCompilationTest {

   @Test
   public void hello() throws Exception {
+    System.out.printf("DEBUG[JavacTurbineTest]: hello test\n");
+    System.out.printf("DEBUG[JavacTurbineTest]: bootclasspath=(%s)%n", System.getProperty("sun.boot.class.path"));
     addSourceLines(
         "Hello.java",
         "class Hello {",

and I commented out the rest of the tests in that class to make it faster.

The test output is:

C:\work\bazel>bazel --output_user_root=c:\tmp1 test //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest --test_output=errors -t-
(...)
==================== Test output for //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest:
JUnit4 Test Runner
.DEBUG[JavacTurbineTest]: hello test
DEBUG[JavacTurbineTest]: bootclasspath=(third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\resources.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\rt.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\sunrsasign.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\jsse.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\jce.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\charsets.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\jfr.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\classes)
DEBUG[JavacTurbineTest]: 1
java.lang.NoSuchFieldError: ANNOTATION_PROCESSOR_MODULE_PATH
        at com.sun.tools.javac.file.Locations.initHandlers(Locations.java:1814)
        at com.sun.tools.javac.file.Locations.<init>(Locations.java:141)
        at com.sun.tools.javac.file.BaseFileManager.createLocations(BaseFileManager.java:115)
        at com.sun.tools.javac.file.BaseFileManager.<init>(BaseFileManager.java:76)
        at com.sun.tools.javac.file.JavacFileManager.<init>(JavacFileManager.java:147)
        at com.google.devtools.build.java.turbine.javac.JavacTurbineCompiler$ClassloaderMaskingFileManager.<init>(JavacTurbineCompiler.java:124)
        at com.google.devtools.build.java.turbine.javac.JavacTurbineCompiler.compile(JavacTurbineCompiler.java:64)
        at com.google.devtools.build.java.turbine.javac.JavacTurbine.compile(JavacTurbine.java:201)
        at com.google.devtools.build.java.turbine.javac.AbstractJavacTurbineCompilationTest.compile(AbstractJavacTurbineCompilationTest.java:99)
        at com.google.devtools.build.java.turbine.javac.JavacTurbineTest.hello(JavacTurbineTest.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at com.google.testing.junit.runner.internal.junit4.CancellableRequestFactory$CancellableRunner.run(CancellableRequestFactory.java:89)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
        at com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:112)
        at com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:144)
        at com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:82)
E
Time: 0.329
There was 1 failure:
1) hello(com.google.devtools.build.java.turbine.javac.JavacTurbineTest)
java.lang.AssertionError: Not true that <ERROR> is equal to <OK_WITH_REDUCED_CLASSPATH>
        at com.google.devtools.build.java.turbine.javac.AbstractJavacTurbineCompilationTest.compile(AbstractJavacTurbineCompilationTest.java:99)
        at com.google.devtools.build.java.turbine.javac.JavacTurbineTest.hello(JavacTurbineTest.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at com.google.testing.junit.runner.internal.junit4.CancellableRequestFactory$CancellableRunner.run(CancellableRequestFactory.java:89)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
        at com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:112)
        at com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:144)
        at com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:82)

FAILURES!!!
Tests run: 1,  Failures: 1

Then I changed src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/BUILD:

diff --git a/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/BUILD b/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/BUILD
index 50082fe..ee3cc34 100644
--- a/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/BUILD
+++ b/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/BUILD
@@ -25,7 +25,7 @@ java_test(
     ],
     jvm_flags = [
         # Simulates how Bazel invokes turbine
-        "-Xbootclasspath/p:$(location //third_party/java/jdk/langtools:javac_jar)",
+        "-Xbootclasspath/p:C:/work/bazel/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar",
     ],
     deps = [
         ":AbstractJavacTurbineCompilationTest",

Now the test output is:

==================== Test output for //src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:JavacTurbineTest:
JUnit4 Test Runner
.DEBUG[JavacTurbineTest]: hello test
DEBUG[JavacTurbineTest]: bootclasspath=(C:/work/bazel/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\resources.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\rt.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\sunrsasign.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\jsse.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\jce.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\charsets.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\lib\jfr.jar;C:\tmp1\o6hbs7n0\external\local_jdk\jre\classes)
DEBUG[JavacTurbineTest]: 1
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
E
Time: 0.429
There was 1 failure:
1) hello(com.google.devtools.build.java.turbine.javac.JavacTurbineTest)
java.lang.AssertionError: Not true that <ERROR> is equal to <OK_WITH_REDUCED_CLASSPATH>
        at com.google.devtools.build.java.turbine.javac.AbstractJavacTurbineCompilationTest.compile(AbstractJavacTurbineCompilationTest.java:99)
        at com.google.devtools.build.java.turbine.javac.JavacTurbineTest.hello(JavacTurbineTest.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at com.google.testing.junit.runner.internal.junit4.CancellableRequestFactory$CancellableRunner.run(CancellableRequestFactory.java:89)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
        at com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:112)
        at com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:144)
        at com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:82)

FAILURES!!!
Tests run: 1,  Failures: 1

Now the java.lang.NoSuchFieldError: ANNOTATION_PROCESSOR_MODULE_PATH is gone, but we have Unable to find package java.lang in classpath or bootclasspath instead.

On both Linux and Windows, adding/removing the jvm_flags attribute results in adding/removing third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar or C:/work/bazel/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar, to/from the beginning of sun.boot.class.path.

Yet on Linux I don't see the Unable to find package java.lang in classpath or bootclasspath error when adding the jvm_flags, like I do on Windows.

@cushon , do you know what could be going on?

@davido
Copy link
Contributor Author

davido commented Nov 27, 2017

//CC @damienmg @meteorcloudy

I could also repro it.

Great! This raises the question, why/how the Bazel-CI is green then? Today we know (#4108), that java_tools are inherently broken on Windows: transitive class path construction compares '/'-separated paths with '\'-separated paths. And, ironically, JavacTurbineTest test would probably catch this breakage, if it would run on Windows?

Or are java_tools tests not active on Bazel CI for some reasons (or not active on Windows)?

Inevitably, this raises another question: what other crucial unit tests are disabled/not active on Windows and why? And consequently, what other severe bugs (like #4108) are still undiscovered on Windows, that would have been discovered, when the existing Bazel unit tests would run on Bazel CI, on Windows as well?

@laszlocsomor
Copy link
Contributor

I'm guessing we don't run the JavacTurbineTest on Windows, since it's not accessible from //src:all_windows_tests.

@cushon has a pending internal commit that fixes this test on Windows. I'm working on fixing the $(location) expansion for data-deps on Windows (#4171). When those are both in, I can enable JavacTurbineTest on Windows.

bazel-io pushed a commit that referenced this issue Nov 29, 2017
See #4165.

PiperOrigin-RevId: 177254510
ochafik pushed a commit to ochafik/bazel that referenced this issue Nov 29, 2017
@lberki lberki added team-Rules-Java Issues for Java rules area-Windows Windows-specific issues and feature requests and removed category: rules > java labels Dec 3, 2018
@dslomov dslomov removed the team-Rules-Java Issues for Java rules label Feb 15, 2019
@dslomov
Copy link
Contributor

dslomov commented Feb 15, 2019

Please do not assign issues to more than one team.

@meisterT
Copy link
Member

@meteorcloudy is this still relevant?

@davido
Copy link
Contributor Author

davido commented May 27, 2020

Not working on Windows Bazel QA any more.

@davido davido closed this as completed May 27, 2020
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests platform: windows team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website under investigation untriaged
Projects
None yet
Development

No branches or pull requests

8 participants