Skip to content

Commit

Permalink
Simplify Cargo metadata for publish = false crates (#198)
Browse files Browse the repository at this point in the history
As of Cargo 1.75 the `version` property in `Cargo.toml` is now optional,
and if omitted is the same as having specified `version = "0.0.0"` and
`publish = false`:
https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-175-2023-12-28
https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field

Therefore for crates that we do not publish, we can now remove both
the `version` and `publish` properties, avoiding the need for the fake
`0.0.0` version that differs from the actual buildpack version in
`buildpack.toml`.

GUS-W-14821120.
  • Loading branch information
edmorley authored Jan 16, 2024
1 parent 27fb94c commit c92a264
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[package]
name = "procfile-buildpack"
# The crate is not published, so the only version that is used is the one in buildpack.toml.
version = "0.0.0"
publish = false
edition = "2021"
rust-version = "1.74"
rust-version = "1.75"

[lints.rust]
unreachable_pub = "warn"
Expand Down

0 comments on commit c92a264

Please sign in to comment.