Bazel aspects: allow sharing source jars and allow empty sourcejars#757
Bazel aspects: allow sharing source jars and allow empty sourcejars#757antonsviridov-src merged 2 commits intomainfrom
Conversation
| mnemonic = "ExtractSourceJars", | ||
| command = """ | ||
| unzip {input_file} -d {output_dir} | ||
| [ "$(unzip -q -l {input_file} | wc -l)" -eq 0 ] || unzip {input_file} -d {output_dir} |
There was a problem hiding this comment.
Inexplicably, unzip returns a 1 exit code if there are any warnings (see Diagnostics on https://linux.die.net/man/1/unzip) with no way to turn it off.
So we just literally count the number of files..
|
@JohnnyMorganz would you like to build this PR from source and try on your repos? |
kritzcreek
left a comment
There was a problem hiding this comment.
If it works, it works. As discussed yesterday :)
Ideally we'd wait with merging until getting positive feedback that it fixes the issue for the customer.
|
Thanks for checking in! Looking good from our side, but I am seeing one issue with test targets. You can repro this by changing the java_test(
name = "testing",
srcs = [
"Foo.java",
":generated-srcjar",
],
test_class = "Foo",
)Running the indexing gives the following error: Sorry, unfortunately I do not know of any good public repo using srcjars to test with |
|
Thanks @JohnnyMorganz, I'll try to address in a separate PR. Will rely on your reproductions then :) |
Closes GRAPH-948
Closes GRAPH-949
Test plan