Skip to content
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

Support additional registries #942

Merged
merged 5 commits into from
Oct 11, 2021

Conversation

illicitonion
Copy link
Collaborator

No description provided.

@illicitonion
Copy link
Collaborator Author

/cc @wt - sorry this took longer to get out than I expected, there was a lot of rebasing to do!

@wt
Copy link
Contributor

wt commented Sep 16, 2021

Don't be sorry. And keep being awesome.

@illicitonion illicitonion force-pushed the additional-registries2 branch 2 times, most recently from 86b3d19 to 13ee51e Compare September 16, 2021 10:01
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what this change is doing? I think I misunderstood it initially. Is this adding plumbing to add a Cargo config to the cargo metadata call?

Also one nit 😄

@@ -6,9 +6,9 @@ load("//rust:defs.bzl", "rust_common")
load("//rust:repositories.bzl", "DEFAULT_TOOLCHAIN_TRIPLES")
load("//rust/platform:triple_mappings.bzl", "system_to_binary_ext", "triple_to_system")

DEFAULT_CRATE_REGISTRY_TEMPLATE = "https://crates.io/api/v1/crates/{crate}/{version}/download"
DEFAULT_DEFAULT_CRATE_DOWNLOAD_URL_TEMPLATE = "https://crates.io/api/v1/crates/{crate}/{version}/download"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEFAULT_DEFAULT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional (but definitely looks weird!)

DEFAULT_CRATE_DOWNLOAD_URL_TEMPLATE is the crate download URL template for crates from the default registry (i.e. crates.io)

This is the default value for that

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment above this then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair - added comment :)

@illicitonion
Copy link
Collaborator Author

Can you explain what this change is doing? I think I misunderstood it initially. Is this adding plumbing to add a Cargo config to the cargo metadata call?

Yes - this is the interface cargo-raze expects in google/cargo-raze#412 so we take alternate registry name-URL pairs specified as kwargs, and generate the relevant cargo config so that cargo-raze will use them.

@UebelAndre
Copy link
Collaborator

Yes - this is the interface cargo-raze expects in google/cargo-raze#412 so we take alternate registry name-URL pairs specified as kwargs, and generate the relevant cargo config so that cargo-raze will use them.

I see, I think this looks fine then, pending my other request. Nice job with the paired change!

@illicitonion illicitonion merged commit e335135 into bazelbuild:main Oct 11, 2021
@illicitonion illicitonion deleted the additional-registries2 branch October 11, 2021 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants