-
Notifications
You must be signed in to change notification settings - Fork 93
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
Can't fetch git dependency that is a workspace #207
Comments
Okay, after doing some more digging this got even weirder. If I just use |
If it helps at all, the generatedCargoNix{
"modelator 0.1.0 (git+https://github.com/informalsystems/modelator?rev=99f656fa8b3cf46a2aa0b6513e4e140d1778c4bd#99f656fa8b3cf46a2aa0b6513e4e140d1778c4bd)":"8532d146bd6d80f31e12285ebb7938e340226f7066a52deb4db126b16fc57ec8"} crate2nix generate{
"modelator 0.1.0 (git+https://github.com/informalsystems/modelator?rev=99f656fa8b3cf46a2aa0b6513e4e140d1778c4bd#99f656fa8b3cf46a2aa0b6513e4e140d1778c4bd)": "1j3yqmpv29mi9pmjv9b6f1pj4h7371wvnpi828gg703dpm3d2cl5"
} |
it doesn't even follow the revision, the revision is incorrect |
@AusCyberman I'm a bit confused, are you saying that the revision I am using for If the URL that crate2nix generates is incorrect, then perhaps that is the bug? |
Oh, i mean im having a similar problem, and thats its even worse than your describing |
I am working on a PR that would fix this issue (+other issue preventing compiling Veloren with this. I think it isn’t the first issue mentionning Veloren btw). The issue that prevented me to using it is 1. an issue with making sure each git repo is only overriden a single time (when there are no reason for it to be overrided twice, resulting in duplicated key and thus error) and the vendered library given as input to the crate2nix binary being the whole workspace instead of just the subdirectory containing the crate as expected by Cargo. I still have to find a good way to find the package folder (currenctly using hardcoded to check if it worked), but it shouldn’t be too hard to implement that somehow (maybe in a subcommand of crate2nix?). I just need to check the name of all crates referenced in the workspace to see if they match the one being vendored. |
I’m dumb enougth that I forgot I already implemented this. https://github.com/kolloch/crate2nix/pull/166/files |
I'm still seeing this error when trying to use a git dependency which is a workspace...is this actually fixed? It also seems to only be an issue when using IFD, running
|
@marius851000 any updates here? Maybe a regression? |
The queuing script was written by ChatGPT and has at least one bug (it spinloops when it runs out of stuff to do). But it works well enough for daily work so I'll commit it for now. This also updates crate2nix/tools.nix, which has many improvements including upstreaming one of my patches and making another (lockfile overrides) much simpler to implement. Also updates nixpkgs. It turns out that cargo 1.77 somehow breaks crate2nix in the case of git dependencies; there is a maybe-related bug nix-community/crate2nix#207 ... ok, so we need to pin rustc in crate2nix. Turns out we can only do this by editing tools.nix; you can't overlay rustc and cargo anymore; see this oxalica/rust-overlay#153 which is basically WONTFIX. This commit leaves the giant comment in andrew-utils.nix intact, though it is now outdated (latest supported nixpkgs and crate2nix). As I am still bisecting to investigate more isssues..
I am getting this error, and I think it is because the git dependency that is being fetched is a workspace. Here is the dependency that is being fetched https://github.com/informalsystems/modelator. This is the Cargo.toml is failing when I call
generatedCargoNix
on this workspaceThe text was updated successfully, but these errors were encountered: