-
Notifications
You must be signed in to change notification settings - Fork 146
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
Can't run integration tests #14
Comments
Could you try on a clean repo? I cannot reproduce on a clean repo. git clone https://github.com/google/j2cl.git
cd j2cl
bazel test //transpiler/javatests/com/google/j2cl/transpiler/integration/... gets the expected result in my Linux machine:
|
I got the same result: [kostik@kostik-laptop Projects]$ git clone https://github.com/google/j2cl.git Starting local Bazel server and connecting to it... |
Could you just remove the deps in transpiler/javatests/com/google/j2cl/transpiler/integration/box2d/BUILD and see if you can build now? I am sending a patch to do that but since it does not reproduce in my setup I would like to be sure the fix I am sending works. |
It went farther, the error is different now: ERROR: /home/kostik/.cache/bazel/_bazel_kostik/2a81219139f53d2833d3cdf6348d1cfd/external/bazel_tools/tools/jdk/BUILD:197:1: SkylarkAction external/bazel_tools/tools/jdk/platformclasspath.jar failed (Exit 1) |
Hmm. I am curious what platform you running under and which version of bazel? |
I am running on Fedora 29. I use open JDK 1.8.0. Build label: 0.19.1- (@non-git) |
I installed javafx and accessibility parts of JDK and it seems to get better. But the error is different now: ERROR: /home/kostik/Projects/j2cl/transpiler/javatests/com/google/j2cl/transpiler/integration/box2d/BUILD:8:1: Compiling Java headers transpiler/javatests/com/google/j2cl/transpiler/integration/box2d/libbox2d_j2cl-hjar.jar (2 files) failed (Exit 1) transpiler/javatests/com/google/j2cl/transpiler/integration/box2d/Box2d.java:25: error: symbol not found org.jbox2d.dynamics.World INFO: Elapsed time: 122.499s, Critical Path: 87.10s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%] |
There is tags "manual" on that target. That shouldn't build unless you specifically ask it to do. |
I run the following command: bazel test //transpiler/javatests/com/google/j2cl/transpiler/integration/... |
That is definitely progress. bazel should not even try to build box2d (with the ... invocation) since the targets are marked you can try with |
Thanks for you help! It passed forward much further than it used to! Most of the tests passed. I understand that the difference between Google repo and what you have here is quite large and it creates a lot of problems. You can't just copy everything in one fell swoop. However, I am quite eager at least to try to contribute here, thus my attempts to do something. |
Here's the final message: Executed 201 out of 201 tests: 196 tests pass and 5 fail locally. |
Thank you for your interest. We are looking forward to your contribution! I think we are in most need to make the experience smoother. W.r.t to failing tests, except for JsInteropRestrictionsCheckerTest that is failing due missing annotations in the public jsinterop-annotation package, the others seem to be failing in phantomjs (logging for example seems to crash phantomjs, the others I have not investigated). I would be good to look at why they are failing, and see also why all the tests fail if Anyhow if you are looking for more specifics I'd be happy to point you in the right direction. |
And where can I find this option. The only place where I found it is j2cl_application.bzl |
Do you mean The option |
I made the change, and the test failed. Here's the message:
I got a resulting compiled_test_bin.js I create a simple page and loaded, this time, I had more error messages:
Is it the right way to debug it? |
If I search the resulting file, I can't find a declaration for AutoCloseable$impl:
As far as I understand, it's a declaration of the module
I had 6 occurences 1 of the 1st kind and 5 of the second. |
If I take a look at the resulting file without BUNDLE, there're no mentions of AutoCloseable$impl. |
Interseting. Could you set |
@rluble If I set this way the page with the message that the test has passed is displayed. |
Well that is progress. I am not sure how to disable the debug loader in bundled mode, but I think the test runner should give better messages when there are errors. |
And why is it implemented in this way? I.e. why transpiler doesn't include all deps? For efficiency purposes? |
The deps are all there, but in order to avoid cyclical module dependencies, j2cl generates extra requires (which are only needed to make sure the relevant sources are included by jscompiler, this is due to a limitation of jscompiler module system and the fact that Java allows cyclic dependencies as long as the code is compiled together). But in jscompiler bundled mode, these extra requires might appear before the the code for the actual module and the debug loader complains. I am not too familiar with the runtime details, but it is my understanding that the debug loader can be used to load modules one by one, but that is not what we are doing in bundled mode. That is why turning the Are you sure |
Describe the bug
When I run the test command I got errors
[kostik@kostik-laptop j2cl]$ bazel test //transpiler/javatests/com/google/j2cl/transpiler/integration/...
ERROR: /home/kostik/Projects/j2cl/transpiler/javatests/com/google/j2cl/transpiler/integration/box2d/BUILD:8:1: no such package 'third_party/java/jbox2d': BUILD file not found on package path and referenced by '//transpiler/javatests/com/google/j2cl/transpiler/integration/box2d:box2d_j2cl'
ERROR: Analysis of target '//transpiler/javatests/com/google/j2cl/transpiler/integration/box2d_noclassmetadata_checksmin:compiled_test_bin' failed; build aborted: no such package 'third_party/java/jbox2d': BUILD file not found on package path
INFO: Elapsed time: 2.386s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (230 packages loaded, 65 targets configured)
FAILED: Build did NOT complete successfully (230 packages loaded, 65 targets configured)
currently loading: jre/java/javaemul/internal/vmbootstrap/primitives
To Reproduce
See the command above
Expected behavior
Tests pass or at least run successfully to completion.
The text was updated successfully, but these errors were encountered: