-
Notifications
You must be signed in to change notification settings - Fork 77
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
Warning: crane cannot find name/version attribute in Cargo.toml #281
Comments
Yeah, I get the same thing since some time ago, and I've added fake |
@fasterthanlime yep that's exactly the reason for that warning! It is an intentional design decision that There's a few way to silence it:
It's also probably worth making this warning message slightly more friendly in terms of suggesting a concrete solution |
Do any of these impact cacheability? A workspace of mine takes longer to build than I think it should (but maybe that's due to the newly-introduced crane-utils? also
Does this also set the version?
Is this cargo-compliant or just something cargo happens to ignore? |
They do since they affect what the resulting Nix path would be. Come to think of it we should probably be making (reopening to track this)
Do you have a lot of derivations using a lot of different rust toolchains by any chance? Current
It will if the specified
Fully cargo compliant. The |
Ah, that's good to know! This feels like the correct fix then.
That seems like a good idea - perhaps better suited for a separate issue on this? I'm not sure why you re-opened that issue, if it's just to answer my questions, consider them answered! |
I wanted to come back and revisit my earlier observation with a fresh head (before forgetting about it) but I'll open a new issue for it, thanks! |
I am getting the version warning on the current master version, even though I think I have set things correctly:
But my root
And my other
If I change the latter to the following, the warning goes away, but that is not ideal:
|
@torhovland Looks like you are explicitly setting the path to cargoToml which means that's the only file that's being looked at for the package version. You can look at the contents of |
You are right, that's a good point. I have now removed all instances of setting I don't think the workspace handling is perfect yet, though. If I set |
Same here - I've been maintaining something on and off for weeks and I keep ping-ponging back between cargo's warning and crane's warning. |
Would using metadata fields (like |
It's been really hard trying to find a balance where we don't throw out the baby with the bathwater in terms of usefulness and not ever seeing a warning in the build logs... |
Sure, no problem. Just wanted to report it as a minor inconvenience. It would be nice if there was a simple way to sort it out. |
I think these are triggered because crane parses my top-level, workspace
Cargo.toml
which lacks these attributes:That top-level
Cargo.toml
file only has:This happens for me on 72fa295 still.
The text was updated successfully, but these errors were encountered: