Repository navigation
fix: a range that matches none of a package's pre-release keys names the pin that works - #870
Open
NopeCharon wants to merge 1 commit into
Open
NopeCharon wants to merge 1 commit into
NopeCharon wants to merge 1 commit into
Conversation
…the pin that works
A package whose only orderable keys are pre-releases (compat.glad publishes
0.0.0-651a425 alone, compat.tray 0.0.0-8dd1358) can never be reached by a
range: a range sees a pre-release only when it names one at the same numbers.
`"*"` or `"^0.0"` against such a package failed with
constraint '*' matches none of: [0.0.0-651a425]
and nothing more. The exact-pin hint was given only for unorderable keys,
while these keys are orderable and took the plain branch.
When every orderable key is a pre-release, the error now says why the range
misses and offers the exact pin, with the highest pre-release as its value:
These keys are pre-releases, which a range matches only when it names a
pre-release of the same version — pin one exactly:
acme.pre = "0.0.0-651a425"
A package that also publishes a release is unchanged: a range can reach
the release, so a miss there is an ordinary one.
e2e 196 covers `*` and `^0.0` over one pre-release key, the highest of
several being offered, the offered pin resolving, and no hint when a
release is published. docs/05 (both languages) states the rule.
Closes mcpp-community#370.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A package whose only orderable keys are pre-releases cannot be reached by any range, because a range sees a pre-release only when it names one at the same numbers.
compat.glad = "*"(or"^0.0") against an index that publishes0.0.0-651a425alone failed withconstraint '*' matches none of: [0.0.0-651a425]and nothing more.resolve_semvergave the exact-pin hint only for unorderable keys, and these keys are orderable, so they took the plain branch.When every orderable key is a pre-release, the error now says why the range misses and offers the exact pin. The value is the highest pre-release:
When a package also publishes a release, the message is unchanged, because a range can reach the release.
docs/05-dependencies.md(both languages) states the rule.Closes #370.
Criteria
tests/e2e/196_version_identity_and_lock.sh), new section 4b:*and^0.0over0.0.0-651a425alone: the error says why and showsacme.pre = "0.0.0-651a425".1.0.0-rc.1and1.0.0-rc.2: the pin offered is1.0.0-rc.2.^2over1.92.8and1.92.8-dockingadds no pre-release hint.main, e2e 196 fails atexpected the error to say why '*' matches none. With the binary from this branch, e2e 196 passes, and so does e2e 69 (69_package_templates.sh, which also assertsmatches none of).Intersections
^1.92.8never picks-docking), §4bCompatibility
Only the text of a resolution error changes. It gains two lines when every orderable key is a pre-release. Resolution itself is unchanged.
Checks before merging
bash .github/tools/check_docs_style.sh,check_docs_structure.shandcheck_version_pins.shpass.python3 .github/tools/check_workflow_assertions.pypasses (a step asserts what its name says).git log origin/main..HEAD -i --grep='Co-Authored-By'prints nothing.compose one from the branch's commits. Suggested subject:
fix: a range that matches none of a package's pre-release keys names the pin that works.