Skip to content

Fix handling of path-only dependencies - #15

Merged
cottsay merged 1 commit into
mainfrom
cottsay/no-version
Jun 25, 2026
Merged

Fix handling of path-only dependencies#15
cottsay merged 1 commit into
mainfrom
cottsay/no-version

Conversation

@cottsay

@cottsay cottsay commented Jun 25, 2026

Copy link
Copy Markdown
Member

This scenario is completely unsupported when crates.io is used, so we have some room to decide how to interpret a dependency specified only by path. If both a version and a path are present, a crate packaged for crates.io will carry the version number only, and pallet-patcher uses that version number for search and resolution as you might expect.

This change interprets the version constraint as "any version", or "*", when there isn't any version number given in the dependency constraints at all.

For clarity, under the existing code, the scenario will always result in a backtrace.

This scenario is completely unsupported when crates.io is used, so we
have some room to decide how to interpret a dependency specified only by
path. If both a version and a path are present, a crate packaged for
crates.io will carry the version number only, and pallet-patcher uses
that version number for search and resolution as you might expect.

This change interprets the version constraint as "any version", or "*",
when there isn't any version number given in the dependency constraints
at all.
@cottsay
cottsay requested a review from Blast545 June 25, 2026 20:03
@cottsay cottsay self-assigned this Jun 25, 2026
@cottsay cottsay added the bug Something isn't working label Jun 25, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.81%. Comparing base (8036dd7) to head (edcc4ff).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #15   +/-   ##
=======================================
  Coverage   81.81%   81.81%           
=======================================
  Files           6        6           
  Lines         264      264           
  Branches       68       68           
=======================================
  Hits          216      216           
  Misses         29       29           
  Partials       19       19           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Blast545 Blast545 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'm surprised we didn't catch that one earlier

@cottsay
cottsay merged commit 0760626 into main Jun 25, 2026
24 checks passed
@cottsay
cottsay deleted the cottsay/no-version branch June 25, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants