-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add a built-in http
module extension
#14570
Comments
What's wrong with using an extension? |
Does this example of an extension do what you want? |
Almost. The solution I've gone for has to been to create a bzlmod extension called http_file that exposes the It would be most helpful if extensions like this shipped with |
I think it's probably cleaner to go with @fmeum's example -- this way, you don't have to copy http_file's attributes into a tag class. You don't need to write what you want to download in the MODULE.bazel file anyway -- just write them in the extension impl function. |
@Wyverald Now that I've thought more about it, I think that this issue may be worth reopening. While the "put repository rules in a static module extension" approach works well for rulesets, it may be difficult to sell to Bazel end users. If |
Ah, true -- we were thinking about introducing an |
http
module extension
Update: @SalmaSamy sent a draft PR (#16000). The repo name conflict issue makes it not worth it to create this built-in module extension (see #16000 (comment)) IMO. |
Chatted with @shs96c ; we decided that writing a separate module extension every time works well enough that this shouldn't be needed. |
#17141 is a duplicated issue. |
Description of the problem / feature request:
Quite often rulesets depend on resources that are downloaded using
http_file
. As an example,rules_jvm_external
depends on downloading bothcoursier
andjq
as tools that it uses. In aWORKSPACE
file, this is easy: a call tohttp_file
and the job is done.bazel_dep
doesn't allow this behaviour, which means that it's impossible to use these kinds of dependencies when using a purely modularised build.Further, some of these dependencies are only used using development, so the equivalent of
bazel_dep
'sdev_dependency
flag is needed to prevent unnecessary downloads for users.Feature requests: what underlying problem are you trying to solve with this feature?
I'd like to be able to download useful tools and artifacts and expose them in a purely modularised build.
What's the output of
bazel info release
?release 5.0.0rc3
The text was updated successfully, but these errors were encountered: