You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scala rules have issues with generated files that are part of resources. The problem is that we are using the file.path attribute to map the destination path for these files, instead of file.short_path.
How to reproduce
Suppose that we add the following rule to test/src/main/resources/scala/test/BUILD:
Then running this bazel build test:ResourcesStripScalaLib will generate the following error:
java.lang.RuntimeException: Resource File bazel-out/local-fastbuild/genfiles/test/src/main/resources/scala/test/generated-hello.txt is not under the specified strip prefix test/
at io.bazel.rulesscala.scalac.ScalacProcessor.getResourcePath(ScalacProcessor.java:313)
at io.bazel.rulesscala.scalac.ScalacProcessor.copyResources(ScalacProcessor.java:295)
at io.bazel.rulesscala.scalac.ScalacProcessor.processRequest(ScalacProcessor.java:74)
at io.bazel.rulesscala.worker.GenericWorker.runPersistentWorker(GenericWorker.java:52)
at io.bazel.rulesscala.worker.GenericWorker.run(GenericWorker.java:121)
at io.bazel.rulesscala.scalac.ScalaCInvoker.main(ScalaCInvoker.java:41)
Target //test:ResourcesStripScalaLib failed to build
@johnynek@ittaiz I've got a PR baking that can fix this, will send shortly
The text was updated successfully, but these errors were encountered:
Problem
Scala rules have issues with generated files that are part of
resources
. The problem is that we are using thefile.path
attribute to map the destination path for these files, instead offile.short_path
.How to reproduce
Suppose that we add the following rule to
test/src/main/resources/scala/test/BUILD
:and then we modify
test/BUILD
to be have this:Then running this
bazel build test:ResourcesStripScalaLib
will generate the following error:@johnynek @ittaiz I've got a PR baking that can fix this, will send shortly
The text was updated successfully, but these errors were encountered: