Skip to content
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

Circular dependency check in CI is wrong about dev-dependencies #2428

Closed
kevinheavey opened this issue Aug 3, 2024 · 4 comments
Closed

Circular dependency check in CI is wrong about dev-dependencies #2428

kevinheavey opened this issue Aug 3, 2024 · 4 comments

Comments

@kevinheavey
Copy link

kevinheavey commented Aug 3, 2024

Problem

It's fine to have apparent circular dependencies if they're just dev-dependencies [UPDATE: they must also be path dependencies], but order-crates-for-publishing.py will still fail in this case. Unfortunately cargo metadata doesn't yet have a way to ignore dev-dependencies: rust-lang/cargo#10718

Proposed Solution

I'll open this one up to the floor, but I see the Python script has a dependency['kind'] == 'dev' check in there - maybe we can just use this check to filter out all dev deps?
Filter out path dev-dependencies in order-crates-for-publishing.py

@kevinheavey
Copy link
Author

I assumed circular dev deps were fine because cargo test is fine with them but looks like cargo publish is not fine with them? rust-lang/cargo#4242

@kevinheavey
Copy link
Author

kevinheavey commented Aug 7, 2024

More investigation reveals that cargo publish is fine with circular dev deps if those dev deps are path dependencies

Example repo here: https://github.com/kevinheavey/circular-dev-dep

@joncinque
Copy link

Was this addressed with #2578?

@kevinheavey
Copy link
Author

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants