How can I stop maturin from installing dev dependencies? #3094
-
|
I used to have my tests and source in the same crate just like every other Rust project but I later found out that in sdist installations, maturin will also install dev dependencies, and this includes whatever property testing framework I am using for my unit tests. This eventually prevented users from overriding I worked around this by moving all my tests and benches into their own crates, but now it has finally come back to bite me because code coverage is having issues detecting the actual source code when it’s pointed at the test crate. In the first place, why does maturin even pull in dev dependencies by default? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
I don't quite understand, if you mean Cargo dev dependencies, maturin just take your Cargo.toml with some adjustments when there are local path deps then call |
Beta Was this translation helpful? Give feedback.
That could invalidate
Cargo.lockI think, breaking builds that wants--locked/--frozen? Anyway I don't think it's good to modifyCargo.tomlin the first place, it creates too much complexity and does not cover edge cases well so we want to avoid it whereever possible.TBH it sounds like the code coverage tool needs fixing.