Skip to content

Commit e3535a0

Browse files
authored
Merge pull request #8378 from rust-lang/renovate/cargo-manifest-0.x
Update Rust crate cargo-manifest to v0.14.0
2 parents a4820d8 + 696b054 commit e3535a0

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ axum = { version = "=0.7.5", features = ["macros", "matched-path"] }
5757
axum-extra = { version = "=0.9.3", features = ["cookie-signed", "typed-header"] }
5858
base64 = "=0.22.1"
5959
bigdecimal = { version = "=0.4.3", features = ["serde"] }
60-
cargo-manifest = "=0.13.0"
60+
cargo-manifest = "=0.14.0"
6161
crates_io_cdn_logs = { path = "crates/crates_io_cdn_logs" }
6262
crates_io_env_vars = { path = "crates/crates_io_env_vars" }
6363
crates_io_github = { path = "crates/crates_io_github" }

crates/crates_io_tarball/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ workspace = true
1111
builder = []
1212

1313
[dependencies]
14-
cargo-manifest = "=0.13.0"
14+
cargo-manifest = "=0.14.0"
1515
flate2 = "=1.0.30"
1616
serde = { version = "=1.0.203", features = ["derive"] }
1717
serde_json = "=1.0.117"

crates/crates_io_tarball/src/manifest.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ pub fn validate_manifest(manifest: &Manifest) -> Result<(), Error> {
2424
}
2525

2626
pub fn validate_package(package: &Package) -> Result<(), Error> {
27+
// Check that the `version` field exists in the package table.
28+
let version = package
29+
.version
30+
.as_ref()
31+
.ok_or(Error::Other("missing field `version`".to_string()))?;
32+
2733
// These checks ensure that package field workspace inheritance has been
2834
// normalized by cargo before publishing.
2935
if package.edition.is_inherited()
3036
|| package.rust_version.is_inherited()
31-
|| package.version.is_inherited()
37+
|| version.is_inherited()
3238
|| package.authors.is_inherited()
3339
|| package.description.is_inherited()
3440
|| package.homepage.is_inherited()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
source: src/tests/krate/publish/manifest.rs
3-
expression: response.into_json()
3+
expression: response.json()
44
---
55
{
66
"errors": [
77
{
8-
"detail": "failed to parse `Cargo.toml` manifest file\n\nTOML parse error at line 1, column 1\n |\n1 | [package]\n | ^^^^^^^^^\nmissing field `version`\n"
8+
"detail": "failed to parse `Cargo.toml` manifest file\n\nmissing field `version`"
99
}
1010
]
1111
}

0 commit comments

Comments
 (0)