bazelbuild / bazelbuild/rules_closure
Create abstract closure_template_library rule
- Dominant language
- Java
- Stars
- 159
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
One of the nice things about Skylark is if you define multiple `ctx.action` statements inside a rule, it will only run each individual action _if necessary_. Therefore, it is possible for us to define a `closure_template_library` rule that generates the JS, Java jar, Python, etc. all at once, and the user only pays for what he needs.
But this is all dependent on whether or not we can export properties in the returned struct that Bazel will understand. I'm hoping that the correct properties will be as follows:
- Java: `compile_time_jars`, `runtime_jars`
- Python: `transitive_py_files`
These are the properties exported by their Skylark reference implementations, e.g. [py_rules.bzl](https://github.com/bazelbuild/bazel/blob/34a6df186b245a03d3f3440d1b90823ae047e6f5/tools/build_rules/py_rules.bzl). The problem is I'm not sure yet if the native rules will understand them. More research is required.
Contributor guide
Assessment
This issue has not been assessed yet.