From f946176e6c5d3824fa29a74be30e7ec9a9f75e5c Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Tue, 16 Jan 2024 12:04:07 +0000 Subject: [PATCH] Simplify Cargo metadata for `publish = false` crates (#74) 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. --- Cargo.lock | 2 +- Cargo.toml | 2 +- buildpacks/php/Cargo.toml | 2 -- composer/Cargo.toml | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 865fbe6..e66f89a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -185,7 +185,7 @@ dependencies = [ [[package]] name = "composer" -version = "0.1.0" +version = "0.0.0" dependencies = [ "derive_more", "monostate", diff --git a/Cargo.toml b/Cargo.toml index 00a885c..6b931f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ members = [ [workspace.package] edition = "2021" -rust-version = "1.74" +rust-version = "1.75" [workspace.lints.rust] unreachable_pub = "warn" diff --git a/buildpacks/php/Cargo.toml b/buildpacks/php/Cargo.toml index 1e64193..09bcf44 100644 --- a/buildpacks/php/Cargo.toml +++ b/buildpacks/php/Cargo.toml @@ -1,7 +1,5 @@ [package] name = "php-buildpack" -version = "0.0.0" -publish = false edition.workspace = true rust-version.workspace = true diff --git a/composer/Cargo.toml b/composer/Cargo.toml index f7cc8f1..6de66b1 100644 --- a/composer/Cargo.toml +++ b/composer/Cargo.toml @@ -1,7 +1,5 @@ [package] name = "composer" -version = "0.1.0" -publish = false edition.workspace = true rust-version.workspace = true