The motivating use case for this change is to allow publishing of crates whose tests rely on code not published in tests, or where the dependency can't otherwise be represented. The current workaround today is to comment out the dev-dependency line for publishing, Two concrete use cases are:
- Test code that must be a separate crate, but doesn't have any reason to be published:
cargo has some proc-macros that it uses for its test suite. This crate has no reason to otherwise be published.
- dev-dependencies that can't otherwise be represented:
diesel is split into multiple crates, one of which provides proc-macros. Prior to 1.0, the crate diesel_codegen (since renamed to diesel_derives) had a dependency on diesel. diesel used diesel_codegen in its doctests. Since this would present a dependency cycle using published versions, this could not be represented without path dependencies.
The following is required for this feature to land:
The motivating use case for this change is to allow publishing of crates whose tests rely on code not published in tests, or where the dependency can't otherwise be represented. The current workaround today is to comment out the dev-dependency line for publishing, Two concrete use cases are:
cargohas some proc-macros that it uses for its test suite. This crate has no reason to otherwise be published.dieselis split into multiple crates, one of which provides proc-macros. Prior to 1.0, the cratediesel_codegen(since renamed todiesel_derives) had a dependency ondiesel.dieseluseddiesel_codegenin its doctests. Since this would present a dependency cycle using published versions, this could not be represented without path dependencies.The following is required for this feature to land:
dependenciestable other than for UI purposes or determining reverse dependenciesIf yes, we will need to determine how best to store these. We may want to store them in a separate table -- otherwise we'll need to change the dependencies table to support crates that don't actually exist. No checklist item for this yet, since the exact steps will depend on what we use it for, and my guess is we don't need to store them.pathfield andrequest.env() != Env::Productiondo not reject it. Do not store it in the database..cratefile..." or "path == path.canoncialize()"path = "foo"orpath = "src/foo"..gitignoreor theexcludefield ofCargo.tomlis out of scope for crates.io*version ranges if the dependency has apathfield