Java rules should be able to build tree artifacts in their sources
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the problem / feature request:
`Java_library` rules does not know how to interpret `TreeArtifact` that `react_scripts`
### Feature requests: what underlying problem are you trying to solve with this feature?
I was trying to bundle a React site in a Java Jar for deployment. See question asked on Slack
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Revert this change and add `resources = [ "//javascript/grid-ui:build" ]`. The contents on the `:build` are not in the jar.
### What operating system are you running Bazel on?
OSX and Linux
### What's the output of `bazel info release`?
```
davidburns in ~/development/selenium on trunk λ bazel info
bazel-bin: /private/var/tmp/_bazel_davidburns/ee760a273fbaa30310e4e04981835b81/execroot/selenium/bazel-out/darwin-fastbuild/bin
bazel-genfiles: /private/var/tmp/_bazel_davidburns/ee760a273fbaa30310e4e04981835b81/execroot/selenium/bazel-out/darwin-fastbuild/bin
bazel-testlogs: /private/var/tmp/_bazel_davidburns/ee760a273fbaa30310e4e04981835b81/execroot/selenium/bazel-out/darwin-fastbuild/testlogs
character-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1
command_log: /private/var/tmp/_bazel_davidburns/ee760a273fbaa30310e4e04981835b81/command.log
committed-heap-size: 1142MB
execution_root: /private/var/tmp/_bazel_davidburns/ee760a273fbaa30310e4e04981835b81/execroot/selenium
gc-count: 432
gc-time: 60770ms
install_base: /var/tmp/_bazel_davidburns/install/3f6b57c2e011992922afe70680fb9546
java-home: /private/var/tmp/_bazel_davidburns/install/3f6b57c2e011992922afe70680fb9546/embedded_tools/jdk
java-runtime: OpenJDK Runtime Environment (build 11.0.6+10-LTS) by Azul Systems, Inc.
java-vm: OpenJDK 64-Bit Server VM (build 11.0.6+10-LTS, mixed mode) by Azul Systems, Inc.
max-heap-size: 2147MB
output_base: /private/var/tmp/_bazel_davidburns/ee760a273fbaa30310e4e04981835b81
output_path: /private/var/tmp/_bazel_davidburns/ee760a273fbaa30310e4e04981835b81/execroot/selenium/bazel-out
package_path: %workspace%
release: release 3.4.1
repository_cache: /var/tmp/_bazel_davidburns/cache/repos/v1
server_log: /private/var/tmp/_bazel_davidburns/ee760a273fbaa30310e4e04981835b81/java.log.davids-macbook-pro.davidburns.log.java.20200819-213313.43194
server_pid: 43194
used-heap-size: 535MB
workspace: /Users/davidburns/development/selenium
```
### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
davidburns in ~/development/selenium on trunk λ git remote get-url origin ; git rev-parse trunk ; git rev-parse HEAD
git@github.com:SeleniumHQ/selenium.git
5a5bc38279920bd67b2c7f805bb6b3adbbc6e190
5a5bc38279920bd67b2c7f805bb6b3adbbc6e190
### Have you found anything relevant by searching the web?
No, asked on Slack and link is above
### Any other information, logs, or outputs that you want to share?
Not really
Contributor guide
Research direction
Start by reproducing the reported case with a Java_library rule whose resources include //javascript/grid-ui:build, using the TreeArtifact produced by react_scripts. Inspect the Java rules' handling of TreeArtifact resources and the resulting jar contents; done means the build output is included in the jar on OSX and Linux.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, react
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100