Skip to content

Commit

Permalink
Fix crates.io URL (#2597)
Browse files Browse the repository at this point in the history
- Resolves #2586
- All other statements already use the correct CDN urls / git repos,
based off of the `config.json`
- The hardcoded path seems to be based off a last ditch effort if theres
not metadata spliced from the crate. I think using the hardcoded path is
fine here, due to the fact that its last ditch, and I do not think the
crates download url will be changing often.
  • Loading branch information
ericmcbride authored Apr 2, 2024
1 parent b3175b2 commit 127b9b8
Show file tree
Hide file tree
Showing 95 changed files with 1,851 additions and 671 deletions.
5 changes: 3 additions & 2 deletions crate_universe/src/metadata/metadata_annotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,11 @@ impl LockfileAnnotation {
// metadata the raw source info is used for registry crates and `crates.io` is
// assumed to be the source.
if source.is_registry() {
// source url
return Ok(SourceAnnotation::Http {
url: format!(
"https://crates.io/api/v1/crates/{}/{}/download",
lock_pkg.name, lock_pkg.version,
"https://static.crates.io/crates/{}/{}/download",
lock_pkg.name, lock_pkg.version
),
sha256: lock_pkg
.checksum
Expand Down
2 changes: 1 addition & 1 deletion examples/bzlmod/hello_world/third-party/crates/defs.bzl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 127b9b8

Please sign in to comment.