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

Make publish-dry-run-v2 work without a list of crates and deprecate v1 #71

Merged
merged 16 commits into from
Jul 16, 2024

Conversation

leighmcculloch
Copy link
Member

What

Make publish-dry-run-v2 work without a list of crates and deprecate v1.

Why

v1 was able to work out what crates to publish, but it had an issue that showed up only on some repos where it would trigger cargo looking up crates on crates.io before they had been published which would fail because the process of packaging the crates for a dry run wasn't preserving the order or using the local registry.

v2 was written to replace v1 but v2 was written requiring an explicit list of crates in the order to publish to avoid the lookups on crates.io.

This change makes v2 no longer require the explicit list by using cargo-workspaces (the tool we use to do actual publishes) to produce a list of crates that need publishing in the order they need publishing.

With this change v2 now works with the same inputs as v1 and so v1 can be completely deprecated and can call through to v2.

Even though the crates list input is no longer needed it remains for backwards compatibility.

@leighmcculloch
Copy link
Member Author

Testing out the workflow here:

@leighmcculloch leighmcculloch marked this pull request as ready for review July 16, 2024 13:05
@leighmcculloch leighmcculloch enabled auto-merge (squash) July 16, 2024 13:05
@leighmcculloch
Copy link
Member Author

It works! And is ready to merge and use.

@leighmcculloch leighmcculloch merged commit fee9b8b into main Jul 16, 2024
2 checks passed
@leighmcculloch leighmcculloch deleted the publish-dry-run-revival branch July 16, 2024 20:41
@leighmcculloch leighmcculloch restored the publish-dry-run-revival branch July 16, 2024 20:41
@leighmcculloch leighmcculloch deleted the publish-dry-run-revival branch July 16, 2024 20:41
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 this pull request may close these issues.

Use cargo workspaces exec (or list) in rust-dry-run-publish-v2 instead of explicit list
2 participants