Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails when package.version not set (Cargo 1.75+) #265

Closed
markdingram opened this issue Mar 21, 2024 · 3 comments
Closed

Fails when package.version not set (Cargo 1.75+) #265

markdingram opened this issue Mar 21, 2024 · 3 comments

Comments

@markdingram
Copy link
Contributor

Since Cargo 1.75 package.version is optional:

package.version field in Cargo.toml is now optional and defaults to 0.0.0. Packages without the package.version field cannot be published. rust-lang/cargo#12786

https:/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-175-2023-12-28

Cargo Chef currently doesn't support this, failing with error:

#21 [clippy chef_prepare 3/6] RUN cargo chef prepare --recipe-path recipe.json
#21 0.273 Error: Failed to compute recipe
#21 0.273 
#21 0.273 Caused by:
#21 0.273     0: TOML parse error at line 1, column 1
#21 0.273          |
#21 0.273        1 | [package]
#21 0.273          | ^^^^^^^^^
#21 0.273        missing field `version`
#21 0.273        
#21 ERROR: process "/bin/sh -c cargo chef prepare --recipe-path recipe.json" did not complete successfully: exit code: 1

Looks like an update to https:/LukeMathWalker/cargo-manifest will be required. Will raise a supporting PR there first.

@LukeMathWalker
Copy link
Owner

Fixed in 7d6adb0
Thanks for the PR!

@bouzuya
Copy link

bouzuya commented May 21, 2024

@LukeMathWalker When will this change be released to crates.io?

@LukeMathWalker
Copy link
Owner

Done now with 0.1.67!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants