Skip to content

Commit

Permalink
crate_universe now renders json formatted lockfiles (bazelbuild#692)
Browse files Browse the repository at this point in the history
Notable changes in this PR:
- `crate_universe` `lockfile` attributes are now rendered as json files instead of starlark dumps
- The `cargo-raze` dependenciy has been updated to a pin which implements the required sorting and de-serialization.
- Formatted `use` declarations
- Updated dependencies
- `CARGO` and `RUSTC` environment variables are now ignored in determining the digest. This should be safe given that `cargo version` is an input to generating the lockfile hash.
- `repository_template` has been renamed to `crate_registry_template`, which is more correct.
- The [json](https://docs.bazel.build/versions/master/skylark/lib/json.html) module is now used to handle generating the config `.json` file
  • Loading branch information
UebelAndre authored Apr 19, 2021
1 parent 42a6740 commit 4ea9bfe
Show file tree
Hide file tree
Showing 15 changed files with 981 additions and 899 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@rules_rust//rust:repositories.bzl", "rust_repositories")

rust_repositories()

load("@rules_rust//crate_universe:defs.bzl", "crate_universe_deps")
load("@rules_rust//crate_universe:deps.bzl", "crate_universe_deps")

crate_universe_deps()

Expand Down
34 changes: 17 additions & 17 deletions crate_universe/Cargo.lock

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

3 changes: 2 additions & 1 deletion crate_universe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ edition = "2018"
anyhow = "1"
cargo_metadata = "0.13.1"
# Until https://github.com/google/cargo-raze/pull/407 is merged:
cargo-raze = { git = "https://github.com/UebelAndre/cargo-raze.git", rev = "caaf8345046eee830ea89fc04771ee117bd835eb", default-features = false }
cargo-raze = { git = "https://github.com/UebelAndre/cargo-raze.git", rev = "0ef1bc28252b7458f214cd69ea6adff0c22ab019", default-features = false }
cfg-expr = "0.7.4"
env_logger = "0.8"
hex = "0.4"
Expand All @@ -39,3 +39,4 @@ assert_cmd = "1"
maplit = "1"
predicates = "1"
spectral = "0.6"
tempfile = "3.2.0"
Loading

0 comments on commit 4ea9bfe

Please sign in to comment.