-
Notifications
You must be signed in to change notification settings - Fork 122
Description
Describe the bug
Package with a git dependency that has a really complicated include section in Cargo.toml doesn't build, because ripgrep excludes files that cargo package would leave included. (There are two conflicting rules, which Cargo and ripgrep seem to interpret differently; cargo allows the more specific include rule to take precedence over the more vague exclusion rule, while ripgrep excludes it based on the vague wildcard rule).
Reproduction
$ nix build -L github:vikanezrimaya/crane-git-dep-include-bugAdditional notes
Adding --debug to the rg invocation in lib/downloadCargoPackageFromGit.nix confirmed the specific rg interpretation described above, while running cargo package in the git checkout of the aforementioned dependency and inspecting the .crate files confirmed that Cargo's behavior matches my expectations.
Perhaps it would be better to simply run cargo package in the crate checkout and then unpack the crates into $out instead of emulating Cargo's behavior using ripgrep?