bazel-contrib / bazel-contrib/rules_scala
Wrapper script does not work with --singlejar
- Dominant language
- Starlark
- Stars
- 384
- Forks
- 292
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 47
Description
If using the `--singlejar` option the wrapper script does not work.
Expected: should work as specified for java (https://docs.bazel.build/versions/master/tutorial/java.html#package-a-java-target-for-deployment)
The line `JAVABIN=${TEST_SRCDIR}/__main__/app/app_wrapper.sh` is "evaluated" to `/__main__/app/app_wrapper.sh` which is invalid.
With singlejar flag:
```
$ ./bazel-bin/app/app --singlejar --print_javabin
/__main__/app/app_wrapper.sh
```
Without singlejar flag:
```
$ ./bazel-bin/app/app --print_javabin
/Users/xxx/code/bazeltest/project/./bazel-bin/app/app.runfiles/__main__/app/app_wrapper.sh
```
There should probably be an option to override JAVABIN path like in the java case:
```
JAVABIN=${JAVABIN:-${JAVA_RUNFILES}/local_jdk/bin/java}
```
Currently the wrapper script hardcodes it to `${TEST_SRCDIR}/__main__/../local_jdk/bin/java`.
Contributor guide
Research direction
Start with app/app_wrapper.sh and the --singlejar and --print_javabin entry points described in the report. Compare the singlejar wrapper's JAVABIN handling with the Java behavior referenced in the issue; done means the wrapper works with --singlejar and prints a valid JAVABIN path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100