-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Outdated lock file when workspace level dependencies #329
Comments
Okay. Looks like a bug. I'll see if I can work in cargo's own way of deciding to perform the update. IIRC there's some high level code that just does it before operations that rely on the lock. |
I added in some rudimentary support for updating the lock file. It's easy to trip over a stale lock file. The behavior is not yet ideal. The Usually modifying the Cargo.nix by hand is easier, but of course both of these are not scalable workarounds. What's no my mind is that each cargo2nix build has a specific cargo version it's tied to. If it was a cargo plugin that used cargo from your shell via metadata (possible in recent versions), we can get around this limit, and it makes more sense to go that way anyway. If I'm not going the plugin route, I need to make cargo2nix do a bit more nuanced handling to detect but inquire about stale lock files. I'm thinking I will go the plugin route immediately after fixing up the feature handling to emit platform dependencies correctly |
Awesome! Let me know if there's anything I can do to help. It's going to be either cargo2nix or nocargo for the company I work for so getting either one to work would be nice. (Albeit... bazel is probably better for what we're trying to do but yea). Let me know if I can be of any assistance. |
For running a company, my wish list would be:
More linking options for embedded is another large ask. All of these are high value for people to use Nix in production. Do any of them align with your company's needs? |
We don't build web clients in Rust. Would be nice to be able to generate API specs from an Axum API or something but im sure that can just be a cargo build.rs :P The MUSL builds would be amazing, plug and play |
I've done MUSL container builds before. The examples in cross compiling show part of the way. The correct crossSystem will IIRC obtain a MUSL build. There's some friction around obtaining both non-cross and cross builds in the same flake. It's easy, just slightly senseless in terms of extra boilerplate. This boilerplate is not required for any architectural reason, just legacy and lack of development. |
Yeah I'm sure it's possible, might be nice to have it be part of the cargo2nix featureset, I might be able to start adding it, if you let me know where to look :P |
It's there. I did it with cargo2nix before. It's just a little bit ugly because you have to declare nixpkgs twice. It should instead be a partial that is evaluated for each target, giving packages..name or something like that. |
Issues with outdated lock files occur if you have a workspace level dependency that's inherited by child projects.
Error:
Cargo.toml:
some-bin/Cargo.toml
some-lib/Cargo.toml
The text was updated successfully, but these errors were encountered: