-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Running 'cargo new' with 'workspace.package.name' set creates an invalid manifest #13258
Comments
Oh I forgot to mention, but this may be a separate issue, but the error is cryptic to what the problem actually is:
|
The reason this is happening is that As for the unhelpful error message, #13172 might help some, but the underlying cause is due to how things are being deserialized. I am not sure if there is an issue tracking for this yet. |
cargo/src/cargo/ops/cargo_new.rs Lines 937 to 939 in 13e9792
As an outsider, special casing 'name' seems correct? In so far as that I don't see it ever making sense to be inherited. |
I'd prefer not to have an allowlist of keys to copy due to the risk of forgetting to update it. |
#13263 confirmed we are warning on |
test(manifest): Verify we warn on unused workspace.package fields I assumed from #13258 that we didn't warn but apparently we do. Figured it'd still be good to keep the test around.
I am setting it, as I am building the workspace as a whole in a nix derivation. Derivations usually have a short descriptive name, this is where it gets pulled from. But I don't think that this is something cargo should care/worry about. Ultimately, a more descriptive error in the case that |
This is incorrect. We reserve the right to add fields that won't be compatible with how people might use them. The place to add a custom field for a tool is |
Problem
I have a workspace that has
workspace.package.name
set. I am aware that it is not a supported key.When creating a new crate with
cargo new
it will setpackage.name.workspace = true
. This is not supported, and will then fail to build the crate.Steps
workspace.package.name
set to a stringcargo new
Possible Solution(s)
Special case 'name' to not be inherited, even if it is set in the workspace?
Notes
No response
Version
The text was updated successfully, but these errors were encountered: