hackerman icon indicating copy to clipboard operation
hackerman copied to clipboard

target filtered dependencies present in the workspace are not supported by split mode hack

Open dabreegster opened this issue 3 years ago • 2 comments

I'm not sure what this means; would it be worth rewriting the error message? If there is a particular dependency creating the incompatibility with the tool, maybe it's helpful to print it so the user can figure out how their setup is strange?

This happened for me on https://github.com/a-b-street/abstreet/blob/master/Cargo.toml.

Super awesome tool; thank you for creating it! I remember puzzling through the rough equivalent of cargo hackerman dupes back in https://old.reddit.com/r/rust/comments/cqceu4/common_crates_in_cargo_workspace_recompiled/. Your tool will save me loads of time going forward.

dabreegster avatar May 09 '22 21:05 dabreegster

I got curious and checked the source; looks like the problem is

[target.'cfg(unix)'.dependencies]
termion = "1.5.6"

and similar.

I guess dependencies per target complicate things... any way to fix the target to unix when running the analysis? Even if it breaks the other targets a bit, could be possible for the user to manually fix things up.

dabreegster avatar May 09 '22 21:05 dabreegster

The problem is not with the analysis but with applying the results to Cargo.toml files. You can try using cargo hackerman hack --dry - it will do the analysis in a usual way but instead of saving the results it will print them out.

pacak avatar May 09 '22 22:05 pacak