-
Notifications
You must be signed in to change notification settings - Fork 599
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
Allow path versions for dev-dependencies #1789
Comments
I'm not sure this will require any changes on crates.io, so I may be a little confused. Cargo can just filter these entries (it's already enforcing it). |
Sorry for being a bit late to this myself, I think I've missed a lot of discussion that's happened already. It's definitely not my fault for jumping in earlier, and I apologize for that! @ehuss has a PR for mostly this at rust-lang/cargo#7333, and the Cargo team was discussing that PR yesterday to see if it's ready to merge. We were under the impression that the previous consensus between Cargo/crates.io was to not merge that PR exactly-as-is, but rather start down the road of "multi crate I'd like to personally push back on this and specifically attempt to make a case for the PR exactly as-is on Cargo. The PR's current implemented behavior looks like:
I personally feel that this is the ideal state to be in for publishing with One of the primary reasons I feel this way is that There's a number of assorted other reasons that crates may not work with All of that basically adds up to that anything to do with I'm curious what those in the previous discussions think about all this? Do y'all have thoughts on the state of the current PR on Cargo? |
I was convinced by @joshtriplett's thoughts re: crater, so I defer to Josh. |
Coming over here form the Cargo PR; I was personally swayed by the argument that cargo test doesn't test everything anyway. I would like to get crater into a better place of still comparing build-pass without tests (i.e., without dev-deps being needed) for those crates where that's needed due to them not building their tests, but that seems like something that's largely up to crater, not crates.io/cargo teams. So, though I'm not on either team so no need to block on me, but I am removing my concern regardless. |
We discussed this in the team meeting today. It looks like the implementation that Cargo is going with does not require any changes on our part regardless of the restrictions that are done. We came to the consensus that we're fine with deferring to the Cargo team on whatever decision they come to over this. |
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:
cargo
has some proc-macros that it uses for its test suite. This crate has no reason to otherwise be published.diesel
is 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
.diesel
useddiesel_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:
dependencies
table 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.path
field andrequest.env() != Env::Production
do not reject it. Do not store it in the database..crate
file...
" or "path == path.canoncialize()"path = "foo"
orpath = "src/foo"
..gitignore
or theexclude
field ofCargo.toml
is out of scope for crates.io*
version ranges if the dependency has apath
fieldThe text was updated successfully, but these errors were encountered: