-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Copy excluding .gitignore files causes failure without --in-place #492
Comments
Hi @ASuciuX This sounds like #117 but I guess you are already using >25.0.0 that includes that fix? If you can narrow this down to a specific failure that will help. Some things to try:
|
Yes, I am using 25.0.0.
I've copied the codebase to a random user location. Should I copy it to a temp root location? |
Separately from this bug: yes, that is better for CI. There's no point spending time copying to a temp directory if the source is itself a disposable temp directory. |
Interesting. If it's not the copying then I guess the problem is with the manifest and cargo config fixups done in https://github.com/sourcefrog/cargo-mutants/blob/main/src/manifest.rs after the copy. cargo-mutants/src/build_dir.rs Lines 55 to 77 in 8c9f648
A good next step would be to find the specific failing cargo command and its output. |
OK the failure is pretty apparent in https://github.com/hirosystems/ordhook/actions/runs/13164203008/job/36740241226#step:9:986,
These names come from https://github.com/Trust-Machines/p256k1/blob/master/p256k1/src/bindings.rs I notice that in this tree, src/bindings.rs is both checked in, and also in I would try with https://github.com/Trust-Machines/p256k1 itself seems to run OK under mutants, although finding some gaps. |
#454 says we perhaps shouldn't skip gitignored files by default, because it saves a bit of time copying but might cause confusing errors when the tree depends on gitignored files. Maybe this is more evidence for it. |
Nice, thank you! It works with How does it skip the gitignored files? Doesn’t it copy them to the temporary runs after building the project? |
With cargo-mutants/src/copy_tree.rs Lines 46 to 60 in debd7cb
|
Thank you |
Hello @sourcefrog, hope you’re doing well!
I’ve seen some great updates since I last implemented cargo-mutants in different workflows.
I ran into an issue where cargo-mutants fails when working with a copied version of the project. The error appears to be a binding issue—multiple dependencies rely on the same library but with different versions, causing cargo build to be unable to resolve them correctly. However, using the
--in-place
flag works fine.I haven’t fully investigated the root cause or a potential underlying solution, but I found that using
--in-place
is preferable for CI regardless. The main concern is that, locally, running cargo-mutants requires a cloned version of the repository, which isn’t ideal. Given this, I wanted to open this issue and share my findings, especially since I noticed specified in the documentation to also share cases like this.Here’s the failing CI action log when running cargo-mutants without
--in-place
:https://github.com/hirosystems/ordhook/actions/runs/13164203008/job/36740241226#step:9:986
And here’s a related discussion on the dependency issue:
hirosystems/ordhook#395
The text was updated successfully, but these errors were encountered: