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

Verification builds fail fetching dev dependency that isn't published yet #605

Open
dignifiedquire opened this issue Nov 28, 2022 · 4 comments
Labels
bug Not as expected

Comments

@dignifiedquire
Copy link

I am publishing https://github.com/n0-computer/iroh using cargo-release@0.24 but unfortunately it determines an incorrect order and aborts half way through: iroh-resolver is attempted to be published before iroh-store, which fails due to their dependency.

@epage

This comment was marked as resolved.

@dignifiedquire

This comment was marked as resolved.

@dignifiedquire
Copy link
Author

Actually my previous comment was wrong, it is a dev-dependency already: https://github.com/n0-computer/iroh/blob/main/iroh-resolver/Cargo.toml#L51 which I guess is the issue for this?

@epage epage changed the title Determined release order in workspace is not working Verification builds fail fetching dev dependency that isn't published yet Nov 29, 2022
@epage
Copy link
Collaborator

epage commented Nov 29, 2022

Ah, yes. This case broke in #422.

From the comment in the change

                // Ignore dev dependencies. This breaks dev dependency cyles and allows for
                // correct publishing order when a workspace package depends on the root package.

                // It would be more correct to ignore only dev dependencies without a version
                // field specified. However, cargo_metadata exposes only the resolved version of
                // a package, and not what semver range (if any) is requested in Cargo.toml.

A workaround is to leave out the version field in you dev-dependency. The only downside is that people won't be able to run tests on your crate from crates.io, which really only affects crater. This is the default behavior if you ran cargo add iroh-store --dev.

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

No branches or pull requests

2 participants