-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose java stub template through @bazel_tools #12994
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind exposing the template, just the implementation of it.
Is it possible to move the java_stub_template.txt file into the tools/java/ directory and then depend on it from rules/java? This way there would be no need for a copy genrule.
95358c7
to
5ebc867
Compare
Absolutely - done! This is now exposed as |
Do you need the whole path? I thought you could put it to tools/jdk package directly. |
If I do that, when I reference it as a |
No sidestepping |
Filegroup doesn't appear to have a |
Sorry, you're right. |
Would you rather I fix up CI for this version, or go back to a genrule which does |
I'd like to have "pretty" code, but I don't have time to play around myself to figure out if there is something nicer. I'll accept the genrule with 'cp'. This way you don't have to deal with peculiarities of the tests and other options like creating out of place directory structure or tinkering with ResourceFileLoader seem worse. I don't know by heart if you could use a regular |
Currently rules_kotlin downloads this via raw.githubusercontent.com: https://github.com/bazelbuild/rules_kotlin/blob/96c70d1d3cc788b03406f7db6a659c78d311c3d8/kotlin/internal/repositories/release_repositories.bzl#L55-L62 https://github.com/bazelbuild/rules_kotlin/blob/96c70d1d3cc788b03406f7db6a659c78d311c3d8/kotlin/internal/jvm/jvm.bzl#L135-L138 This will allow rules_kotlin to point at a file from Bazel proper, rather than downloading it via the internet.
5ebc867
to
e8c6648
Compare
I played around with |
Thanks! |
bazelbuild#12994 added the file, but it's currently exposed as: `@build_tools//tools:java/java_stub_template.txt` This fixes it up to be properly exposed as: `@build_tools//tools/java:java_stub_template.txt` Which makes more sense :)
bazelbuild#12994 added the file, but it's currently exposed as: `@build_tools//tools:java/java_stub_template.txt` This fixes it up to be properly exposed as: `@build_tools//tools/java:java_stub_template.txt` Which makes more sense :)
bazelbuild#12994 added the file, but it's currently exposed as: `@build_tools//tools:java/java_stub_template.txt` This fixes it up to be properly exposed as: `@build_tools//tools/java:java_stub_template.txt` Which makes more sense :)
bazelbuild#12994 added the file, but it's currently exposed as: `@build_tools//tools:java/java_stub_template.txt` This fixes it up to be properly exposed as: `@build_tools//tools/java:java_stub_template.txt` Which makes more sense :)
bazelbuild#12994 added the file, but it's currently exposed as: `@build_tools//tools:java/java_stub_template.txt` This fixes it up to be properly exposed as: `@build_tools//tools/java:java_stub_template.txt` Which makes more sense :)
This was added in bazelbuild/bazel#12994 (and fixed in bazelbuild/bazel#13790). This has been included in all Bazel releases since 5.0.0, which is the minimum supported Bazel version of rules_kotlin according to https://github.com/bazelbuild/rules_kotlin/blob/master/README.md This prevents having a build-time dependency on access to raw.githubusercontent.com.
This was added in bazelbuild/bazel#12994 (and fixed in bazelbuild/bazel#13790). This has been included in all Bazel releases since 5.0.0, which is the minimum supported Bazel version of rules_kotlin according to https://github.com/bazelbuild/rules_kotlin/blob/master/README.md This prevents having a build-time dependency on access to raw.githubusercontent.com.
This was added in bazelbuild/bazel#12994 (and fixed in bazelbuild/bazel#13790). This has been included in all Bazel releases since 5.0.0, which is the minimum supported Bazel version of rules_kotlin according to https://github.com/bazelbuild/rules_kotlin/blob/master/README.md This prevents having a build-time dependency on access to raw.githubusercontent.com.
This was added in bazelbuild/bazel#12994 (and fixed in bazelbuild/bazel#13790). This has been included in all Bazel releases since 5.0.0, which is the minimum supported Bazel version of rules_kotlin according to https://github.com/bazelbuild/rules_kotlin/blob/master/README.md This prevents having a build-time dependency on access to raw.githubusercontent.com.
Currently rules_kotlin downloads this via raw.githubusercontent.com:
https://github.com/bazelbuild/rules_kotlin/blob/96c70d1d3cc788b03406f7db6a659c78d311c3d8/kotlin/internal/repositories/release_repositories.bzl#L55-L62
https://github.com/bazelbuild/rules_kotlin/blob/96c70d1d3cc788b03406f7db6a659c78d311c3d8/kotlin/internal/jvm/jvm.bzl#L135-L138
This will allow rules_kotlin to point at a file from Bazel proper,
rather than downloading it via the internet.