Skip to content

Fix transitive local path propagation for --registry flag#72

Closed
sigurpol wants to merge 2 commits intomainfrom
sigurpol-improve-bump-deps
Closed

Fix transitive local path propagation for --registry flag#72
sigurpol wants to merge 2 commits intomainfrom
sigurpol-improve-bump-deps

Conversation

@sigurpol
Copy link
Copy Markdown

When apply --registry rewrites dependencies, crates not on crates.io use local paths while existing versions use registry. This creates inconsistent graphs: if crate A is bumped (not on crates.io) but dependent B exists on registry, the registry B pulls old A, causing duplicate versions and trait bound errors.

Now computes transitive closure of crates requiring local paths before rewriting, ensuring dependents of local-only crates also use local paths.

When apply --registry rewrites dependencies, crates not on crates.io
use local paths while existing versions use registry. This creates
inconsistent graphs: if crate A is bumped (not on crates.io) but
dependent B exists on registry, the registry B pulls old A, causing
duplicate versions and trait bound errors.

Now computes transitive closure of crates requiring local paths before
rewriting, ensuring dependents of local-only crates also use local paths.
@sigurpol
Copy link
Copy Markdown
Author

See related SDK tentative PR: paritytech/polkadot-sdk#10905

@sigurpol sigurpol requested review from ggwpez and kianenigma January 26, 2026 20:12
@sigurpol sigurpol requested review from bkchr and iulianbarbu January 27, 2026 07:14
@sigurpol
Copy link
Copy Markdown
Author

sigurpol commented Jan 27, 2026

The main question @iulianbarbu @bkchr is if in a scenario like the one described in this PR, we want to actually fail so the current behavior is correct or if we want to propagate local path to all deps of a not published crate

@iulianbarbu
Copy link
Copy Markdown
Contributor

My opinion is that what you did here: paritytech/polkadot-sdk#10905 is the correct fix for the situation you found yourself in. Doing this fix will hide missing bumps I think, which are relevant before trying to do a certain release that captures all the updates for all the crates.

@sigurpol
Copy link
Copy Markdown
Author

Hey @iulianbarbu - I agree with you, this change would just make the CI job happy hiding the truth for release team (cc @EgorPopelyaev ) so I'll drop it

@sigurpol sigurpol closed this Jan 27, 2026
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.

2 participants