archive_override() and git_override() should allow for same arguments as their repository rule counterparts #24412
Labels
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
untriaged
Description of the bug:
Currently, one cannot use all attributes with
archive_override()
that you can withhttp_archive()
, which prevents some ability of using the module extension with things like the Github API to download archives.We should probably make sure that
archive_override()
is sync'ed withhttp_archive
or makearchive_override()
forward kwargs tohttp_archive()
.The example case I'm running into is wanting to use the github api to download an archive, which does not include a filename extension, it has the form:
https://api.github.com/repos/<org>/<repo>/tarball/<commit>
It is possible to be used with
http_archive()
by also providing thetype
attribute, butarchive_override()
does not allow for this attribute.Which category does this issue belong to?
External Dependency
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Try to use
archive_override()
with the github api:Then use something like
query
to try to download the archive, eg.:Which operating system are you running Bazel on?
Ubuntu 22.04
What is the output of
bazel info release
?release 7.4.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
I asked the question on the bazel slack workspace here: https://bazelbuild.slack.com/archives/C014RARENH0/p1731963696305899
Where it was indicated that similar reports of discrepancies were reported for the
git_repository()
extension as well. So it would be good to have a way to keep the rules and extensions in sync.The text was updated successfully, but these errors were encountered: