Transitive data
files do not propagate through kt_jvm_library
as they do in java_library
.
#1033
Labels
note: good first issue
Good for newcomers
note: help wanted
Extra attention is needed
type: bug
Something isn't working
I've been tracking down a bug we've noticed where files specified in the
data
attribute of either akt_jvm_library
or ajava_library
do not show up in the runtime of our unit tests.The issue only happens when there is at least 1 hop between the
data
attribute and the test target. EG:library w/ data -> kt library -> test binary
The issue is also specific to
kt_jvm_library
. If all of the libraries in the chain arejava_library
targets, then we see the file as we expect.The issue can be reproduced with 3 files (excluding workspace & maven setup).
repro/BUILD.bazel
repro/DataAttributeTest.java
repro/transitive_data.txt
Given the above setup, you will notice that the
//repro:java_test
will pass, but//repro:kt_test
will fail. Addingdata = ["transitive_data.txt"]
directly to thekt_jvm_library
will make things pass, so will addingjava_library_with_data
to the runtime deps of thekt_test
target. Switchingjava_library_with_data
to usekt_jvm_library
does not help, and neither does switchingkt_test
to usekt_jvm_test
.This was tested using:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected] targeting 1.5 api version
junit:junit:4.13.2
The text was updated successfully, but these errors were encountered: