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

scala_test on Windows failing due to null/empty RULES_SCALA_ARGS_FILE #796

Closed
jin opened this issue Jul 22, 2019 · 12 comments
Closed

scala_test on Windows failing due to null/empty RULES_SCALA_ARGS_FILE #796

jin opened this issue Jul 22, 2019 · 12 comments

Comments

@jin
Copy link
Member

jin commented Jul 22, 2019

Repro on a Windows machine:

git clone https://github.com/bazelbuild/rules_jvm_external
cd rules_jvm_external/examples/scala_akka
bazel test //... --test_output=errors
Starting local Bazel server and connecting to it...
DEBUG: C:/users/jingwen/_bazel_jingwen/viloy4hd/external/io_bazel_rules_scala/scala/scala_maven_import_external.bzl:59:9: 'jar_sha256' is deprecated. Please use 'artifact_sha256'
INFO: Analyzed 4 targets (81 packages loaded, 1384 targets configured).
INFO: Found 2 targets and 2 test targets...
INFO: From Building external/com_google_protobuf/libprotobuf_java.jar (122 source files, 1 source jar):
warning: -parameters is not supported for target value 1.7. Use 1.8 or later.
FAIL: //:test_test_suite_src_test_scala_hello_EndpointSpec.scala (see C:/users/jingwen/_bazel_jingwen/viloy4hd/execroot/__main__/bazel-out/x64_windows-fastbuild/testlogs/test_test_suite_src_test_scala_hello_EndpointSpec.scala/test.log)
INFO: From Testing //:test_test_suite_src_test_scala_hello_EndpointSpec.scala:
==================== Test output for //:test_test_suite_src_test_scala_hello_EndpointSpec.scala:
Exception in thread "main" java.lang.IllegalArgumentException: RULES_SCALA_ARGS_FILE is null or empty.
        at io.bazel.rulesscala.scala_test.Runner.extendFromFileArgs(Runner.java:46)
        at io.bazel.rulesscala.scala_test.Runner.extendArgs(Runner.java:38)
        at io.bazel.rulesscala.scala_test.Runner.main(Runner.java:34)
================================================================================
FAIL: //:test_test_suite_src_test_scala_hello_ConfigurationSpec.scala (see C:/users/jingwen/_bazel_jingwen/viloy4hd/execroot/__main__/bazel-out/x64_windows-fastbuild/testlogs/test_test_suite_src_test_scala_hello_ConfigurationSpec.scala/test.log)
INFO: From Testing //:test_test_suite_src_test_scala_hello_ConfigurationSpec.scala:
==================== Test output for //:test_test_suite_src_test_scala_hello_ConfigurationSpec.scala:
Exception in thread "main" java.lang.IllegalArgumentException: RULES_SCALA_ARGS_FILE is null or empty.
        at io.bazel.rulesscala.scala_test.Runner.extendFromFileArgs(Runner.java:46)
        at io.bazel.rulesscala.scala_test.Runner.extendArgs(Runner.java:38)
        at io.bazel.rulesscala.scala_test.Runner.main(Runner.java:34)
================================================================================
INFO: Elapsed time: 164.653s, Critical Path: 58.49s
INFO: 232 processes: 217 local, 15 worker.
INFO: Build completed, 2 tests FAILED, 267 total actions
//:test_test_suite_src_test_scala_hello_ConfigurationSpec.scala          FAILED in 3.1s
  C:/users/jingwen/_bazel_jingwen/viloy4hd/execroot/__main__/bazel-out/x64_windows-fastbuild/testlogs/test_test_suite_src_test_scala_hello_ConfigurationSpec.scala/test.log
//:test_test_suite_src_test_scala_hello_EndpointSpec.scala               FAILED in 2.9s
  C:/users/jingwen/_bazel_jingwen/viloy4hd/execroot/__main__/bazel-out/x64_windows-fastbuild/testlogs/test_test_suite_src_test_scala_hello_EndpointSpec.scala/test.log

INFO: Build completed, 2 tests FAILED, 267 total actions

The same tests pass on Linux and macOS.

@johnynek
Copy link
Member

thanks for the bug report. Note, we have a windows CI that usually passes, so this is strange.

what version of bazel did you try this with?

@johnynek
Copy link
Member

@jin
Copy link
Member Author

jin commented Jul 22, 2019

This is with Bazel 0.28.1. The tests are actually passing with 0.25.3, so I guess something changed between these versions for the Windows code path.

@rivashin
Copy link
Contributor

I get exactly the same error on windows with Bazel 2.0.0 on a small test project.
What are the chances of this getting fixed? We're evaluating adopting Bazel and rules_scala for our project, but this issue obviously blocks it.

@ittaiz
Copy link
Member

ittaiz commented Jan 15, 2020

TBH Windows support has been problematic since none of the people working on this repo uses Windows or has users with Windows...
Can you work around this for your evaluation (For example use mac/linux)? If this will be the only blocker then I guess we'll find time to help

@rivashin
Copy link
Contributor

I see. That's unfortunate, as we develop on Windows (company policy), so need a good user experience for devs in order to justify switching to Bazel. I doubt this will be the only issue - I have discovered a couple of other already.
We'd consider contributing to fix these at some point, but obviously would need some help in the beginning.

@johnynek
Copy link
Member

@rivashin I think any issue would be pretty easy to fix and would almost always be around path issues.

@ittaiz
Copy link
Member

ittaiz commented Jan 16, 2020

+1 on what Oscar said.
I’ll just add that we had windows support but the dev who added it went silent and we had frequent problems with the tests so we had to disable it.
If y’all would be committed to fixing the windows issues then we’d be really happy to have windows support.
Helping you getting started shouldn’t be a problem as well.

@rivashin
Copy link
Contributor

Well at the moment I can't even build the first of our modules due to bazel-contrib/rules_jvm_external#363
Can't build, can't test - not the best start :(
I'll try debugging the issue with RULES_SCALA_ARGS_FILE when I'll be able to build the project. Is there a guide on debugging Bazel? E.g. recommended command-line params to enable some useful debug info?

@rivashin
Copy link
Contributor

Looks like this used to work but got broken by this change

@ittaiz
Copy link
Member

ittaiz commented Jan 18, 2020

Thanks! That explains the change...

@ittaiz
Copy link
Member

ittaiz commented Jan 18, 2020

Fixed by #941

@ittaiz ittaiz closed this as completed Jan 18, 2020
gergelyfabian pushed a commit to gergelyfabian/rules_scala that referenced this issue May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants