Skip to content

Commit

Permalink
Keep "resolver" when cleaning Cargo.toml (ipetkov#327)
Browse files Browse the repository at this point in the history
For projects using version != 2021 and resolver = 2, the resolver
information needs to be kept or otherwise the dependency build might
fail.

---------

Co-authored-by: Ivan Petkov <[email protected]>
  • Loading branch information
Detegr and ipetkov authored May 19, 2023
1 parent 1d1186c commit 99de890
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
* Added support for the [Trunk](https://trunkrs.dev) wasm app build tool

### Changed
* `resolver` key is no longer cleaned from Cargo.toml

### [0.12.1] - 2023-04-10

### Changed
Expand Down
1 change: 1 addition & 0 deletions checks/cleanCargoTomlTests/complex/expected.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ path = "src/lib.rs"
[package]
edition = "2021"
name = "some name"
resolver = "2"
version = "1.2.3"
workspace = "some/path/to/workspace"

Expand Down
2 changes: 1 addition & 1 deletion lib/cleanCargoToml.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ let
"publish"
"readme"
"repository"
"resolver"
"rust-version"

# Additional package attributes which are expressly kept in
# (but listed here for audit purposes)
# "edition" # Influences cargo behavior
# "name" # Required
# "resolver" # Influences cargo behavior when edition != 2021
# "version" # Required
# "workspace" # Keep project structure as is
];
Expand Down

0 comments on commit 99de890

Please sign in to comment.