Skip to content

fix(solve): say where a pin outside the hierarchy is - #42

Merged
HaoZeke merged 1 commit into
mainfrom
fix/pin-hierarchy-error
Nov 16, 2026
Merged

HaoZeke merged 1 commit into
mainfrom
fix/pin-hierarchy-error

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

A pin on a package the trees have only outside the solve's toolchain hierarchy now names the hierarchy searched and the toolchains that have the package, instead of "unknown package".

  • A stack solve policy pin, or a package plan / package bump stack-policy pin, failed as "unknown package" and "names a package with no candidate at all" when the trees had the name only outside the hierarchy. Both callers now check pins against the whole parsed tree before the solve, and so do stack-policy exclusions. A name no tree has keeps the solver's message. Which solves succeed does not change: the provider rejected every such pin before solving.

a_version_only_pin_outside_the_hierarchy_says_where_the_package_is and a_pin_outside_the_hierarchy_says_where_the_package_is cover those. The commit has a towncrier fragment. Main has no towncrier yet; #26 (fix/towncrier) adds it.

A pin on a package the trees carry only above or beside the solve
toolchain was reported as unknown. package plan --toolchain
GCCcore/15.2.0 with a stack policy pinning SciPy-bundle failed with
"stack policy references unknown package SciPy-bundle", and stack solve
with the same pin in a GCCcore-15.2.0 policy with "no candidates for
package pin references unknown package SciPy-bundle" and "pin
SciPy-bundle ==2026.05 names a package with no candidate at all". The
robot has SciPy-bundle-2026.05-gfbf-2026.1.eb. The universe the provider
reads is filtered to the hierarchy first, so it cannot tell a name the
hierarchy lacks from a name no tree has.

Both callers now check pins against the whole parsed tree before the
solve, and so do stack-policy exclusions. A name the hierarchy lacks but
a tree has fails with the hierarchy searched and the toolchains the trees
have it on, through hierarchy::name_outside_hierarchy. A name no tree
has keeps the solver's message. Which solves succeed does not change:
the provider rejected every such pin before solving.

Tests in hierarchy_universe.rs and bump_workflow.rs cover the two paths
and fail without the fix. policy.org and new-package.org say what the
failure names.
@HaoZeke
HaoZeke merged commit e348fcc into main Nov 16, 2026
21 checks passed
@HaoZeke
HaoZeke deleted the fix/pin-hierarchy-error branch November 16, 2026 05:08
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.

1 participant