Skip to content

Apply flat index policies in each resolver - #21540

Merged
charliermarsh merged 2 commits into
mainfrom
charlie/uv-flat-index-policy
Sep 8, 2026
Merged

charliermarsh merged 2 commits into
mainfrom
charlie/uv-flat-index-policy

Conversation

@charliermarsh

Copy link
Copy Markdown
Member

FlatIndex currently ranks --find-links entries using the caller's hash policy, platform tags, and build options. Reusing that index in a build resolver requires callers to construct a separate index whenever those policies differ.

We now keep the raw entries in FlatIndex and rank each requested package inside DefaultResolverProvider. This lets build dispatches share an index and reduces BuildDispatch::fork to a hash-strategy argument.

Follow-up to #21223.

@charliermarsh
charliermarsh requested a review from zanieb September 8, 2026 17:39
@charliermarsh charliermarsh added the internal A refactor or improvement that is not user-facing label Sep 8, 2026
@charliermarsh
charliermarsh merged commit 1a5e92c into main Sep 8, 2026
47 checks passed
@charliermarsh
charliermarsh deleted the charlie/uv-flat-index-policy branch September 8, 2026 18:54
charliermarsh added a commit that referenced this pull request Sep 8, 2026
We borrow the selected build hash strategy in `do_lock` and the caller's
strategy in `DefaultResolverProvider`, avoiding unnecessary strategy
clones and hash-map reference-count updates. The resolver thread,
lookahead results, and cached version maps retain owned policy
snapshots.

Stacked on #21540. Follows up on
#21223 (comment).
zanieb pushed a commit that referenced this pull request Sep 24, 2026
Pixi uses `FlatDistributions` to build `VersionMap` values from its own
distributions, but #21540 made the type private and removed
its `BTreeMap` conversion. Restore the public re-export and conversion,
and record the downstream API in `hawk.toml`.

Fixes #21964.

Co-authored-by: zaniebot <[email protected]>

This branch was previously deployed

1 inactive deployment
automations — 6619f1c5 Deployed Sep 8, 2026 by charliermarsh via review / security review #46104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants