Skip to content

Unify URL/URLs parameter code across http_archive, http_file, http_jar#15719

Merged
ckolli5 merged 2 commits intobazelbuild:release-5.3.0from
ckolli5:ck/unify-url-parameter-code
Jun 22, 2022
Merged

Unify URL/URLs parameter code across http_archive, http_file, http_jar#15719
ckolli5 merged 2 commits intobazelbuild:release-5.3.0from
ckolli5:ck/unify-url-parameter-code

Conversation

@ckolli5
Copy link
Copy Markdown

@ckolli5 ckolli5 commented Jun 22, 2022

Hi wonderful Bazel folks,

I--like probably everyone else--make heavy use of the (super handy) http repository rules.

While using them, I'd noticed that the docs for the URL attributes they have in common had started drifting. For example, http_file's URLs array doc was mostly same as http_archive's, except that it forgot to specify that the URLs were tried in the order they were specified. jar_file's were much less complete. Similarly, only http_file was missing the URL parameter, which seems a shame, since probably most people only want to supply one authoritative source most of the time. When I looked at the code, it became clear that this was because the implementations were copy-pasted, and being updated separately.

So I spent a few minutes cleaning things up and making these commonly used features a little more consistent, fixing the issues above. Hopefully that's welcome.

I'd love your thoughtful consideration and review!

Thanks, wonderful Bazel folks, for all you do!

Cheers,
Chris
(ex-Googler)

P.S. I've given edit access with the "allow edits by maintainers" box. If there are things you'd like changed, feel free also to just make them directly!

Closes #15408.

PiperOrigin-RevId: 449225740

cpsauer and others added 2 commits June 21, 2022 21:32
Hi wonderful Bazel folks,

I--like probably everyone else--make heavy use of the (super handy) http repository rules.

While using them, I'd noticed that the docs for the URL attributes they have in common had started drifting. For example, http_file's URLs array doc was mostly same as http_archive's, except that it forgot to specify that the URLs were tried in the order they were specified. jar_file's were much less complete. Similarly, only http_file was missing the URL parameter, which seems a shame, since probably most people only want to supply one authoritative source most of the time. When I looked at the code, it became clear that this was because the implementations were copy-pasted, and being updated separately.

So I spent a few minutes cleaning things up and making these commonly used features a little more consistent, fixing the issues above. Hopefully that's welcome.

I'd love your thoughtful consideration and review!

Thanks, wonderful Bazel folks, for all you do!

Cheers,
Chris
(ex-Googler)

P.S. I've given edit access with the "allow edits by maintainers" box. If there are things you'd like changed, feel free also to just make them directly!

Closes #15408.

PiperOrigin-RevId: 449225740
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants