feat(pkg): solve all requested platforms together - #15982
Merged
Conversation
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
3 times, most recently
from
August 17, 2026 11:39
6783d45 to
bd35eab
Compare
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
from
August 17, 2026 11:50
bd35eab to
33fe18e
Compare
Alizter
marked this pull request as ready for review
August 17, 2026 11:53
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
from
August 17, 2026 14:08
33fe18e to
fa8b474
Compare
This was referenced Aug 17, 2026
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
from
August 17, 2026 16:32
fa8b474 to
ff35b1a
Compare
Alizter
added a commit
that referenced
this pull request
Aug 17, 2026
## Summary - Add a trace-based regression for a lock directory with exactly one requested platform. - Assert the exact SAT problem size for a fixed one-package input: two variables and two clauses. - Guard against adding cross-platform consistency encoding to the single-platform path. This is an independent test-only performance baseline for the joint-solver work in #15982. ## Tests - `nix develop -c dune runtest test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-single-platform-sat-size.t` - `CI=true nix develop -c dune build @fmt @check`
Alizter
added a commit
that referenced
this pull request
Aug 17, 2026
## Summary - Add a portable lock-directory regression with distinct extra files attached to two versions of one package. - Constrain the solve to the common selected version and assert that its file is copied into the lock directory. - Assert that files belonging only to the rejected version are omitted. This is an independent test-only baseline for per-platform lock extraction in #15982. ## Tests - `nix develop -c dune runtest test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-common-version-extra-files.t` - `CI=true nix develop -c dune build @fmt @check`
Alizter
added a commit
that referenced
this pull request
Aug 17, 2026
## Summary - Add a portable lock-directory regression for an unfiltered dependency alternative whose implementations are available on different platforms. - Assert that locking preserves the implementation selected for each platform. - Build the resulting lock directory on Linux and macOS to cover consumption as well as the lock summary. This snapshots the existing per-platform selection invariant before the joint-solver change in #15982. ## Tests - `nix develop -c dune runtest test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-platform-alternative-selection.t` - `CI=true nix develop -c dune build @fmt @check`
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
from
August 17, 2026 18:07
ff35b1a to
bd76ef4
Compare
Alizter
marked this pull request as draft
August 17, 2026 18:12
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
from
August 17, 2026 18:44
bd76ef4 to
d9132ec
Compare
Alizter
added a commit
that referenced
this pull request
Aug 17, 2026
## Summary - Add a regression documenting that existing language versions currently allow a portable lock directory to choose different versions of one package on different platforms. - Use mutually exclusive Linux and macOS availability filters to make that behavior explicit. - Establish the compatibility baseline changed by the joint solver. This test intentionally documents legacy behavior; #15982 updates its expectation to the intended all-platform failure when no common version exists. ## Tests - `nix develop -c dune runtest test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-language-version-compatibility.t` - `CI=true nix develop -c dune build @fmt @check`
Alizter
added a commit
that referenced
this pull request
Aug 17, 2026
## Summary - Add a portable lock-directory regression for a local package whose dependency and conflict formulas contain platform filters. - Request Linux explicitly and assert that `foo.2` remains selectable there. - Guard against evaluating local-package formulas in a platform-less environment before multi-platform solving. This is an independent test-only baseline for the joint-solver work in #15982. ## Tests - `nix develop -c dune runtest test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-local-platform-constraints.t` - `CI=true nix develop -c dune build @fmt @check`
Alizter
added a commit
that referenced
this pull request
Aug 17, 2026
## Summary - Add a portable lock-directory regression for a package that exists in the repository but is unavailable on Linux. - Assert that the solver reports `Availability condition not satisfied` for the requested Linux platform. - Guard against reconstructing rejection reasons in a platform-less environment. This is an independent test-only baseline for the joint-solver work in #15982. ## Tests - `nix develop -c dune runtest test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-platform-rejection-reason.t` - `CI=true nix develop -c dune build @fmt @check`
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
4 times, most recently
from
August 18, 2026 10:54
5a6beb1 to
4530788
Compare
Alizter
marked this pull request as ready for review
August 22, 2026 13:09
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
16 times, most recently
from
August 25, 2026 11:51
77ab0c7 to
6382754
Compare
This was referenced Aug 25, 2026
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
4 times, most recently
from
August 25, 2026 23:44
68a22c6 to
52aee1a
Compare
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
from
August 25, 2026 23:54
52aee1a to
6301bf2
Compare
Alizter
added a commit
that referenced
this pull request
Aug 26, 2026
## Summary - Record the current per-platform diagnostic behavior before joint multi-platform solving changes it. - Cover a conditional dependency failing on one requested platform and identical failures on two of four requested platforms. - Cover a pin whose availability differs by platform, including alternative selection and the mandatory-pin failure path without reporting repository versions shadowed by the pin. - Correct stale prose for non-boolean availability filters, which are already treated as unavailable without printing a warning. This is a green preparatory change for #15982; it does not change solver behavior. ## Checks - `dune runtest test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-all-or-nothing.t test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-platform-rejection-reason.t test/blackbox-tests/test-cases/pkg/unavailable-packages.t`
Build one SAT universe for every requested platform instead of solving each platform independently. Enforce one version per package name across platforms while allowing different package-name alternatives, evaluate repository and pinned-package availability in each platform environment, and minimize distinct avoid-version package versions. Preserve the existing origin-specific rules: local packages bypass availability and local-package refutation, while pinned packages bypass only local-package refutation. Keep the single-platform SAT encoding unchanged, preserve each selected platform package when extracting lock data, and only copy extra files for selected package versions. Consolidate joint-solve diagnostics by package while qualifying failures that affect only a subset of requested platforms. Remove the unreachable warning for non-boolean availability filters, which are treated as unavailable. Expose the final helper for deriving the base solver environment and platform overlays for portable and non-portable solves. Signed-off-by: Ali Caglayan <alizter@gmail.com>
Alizter
force-pushed
the
push-kzszzntwnrxt
branch
from
August 26, 2026 00:10
6301bf2 to
24cef7f
Compare
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
This branch is rebased on
mainafter #16210 landed. It does not include #16172 or #16173.Landed preparation
The following independent preparatory PRs have landed on
main.Observability and solver invariants
sat/solvestatistics.Per-platform semantics
Joint-solve edge cases
Build and tool integration
solve_for_platformsentries and conflicting lock-stanza solver variables.Independent related fixes
The following sibling PRs are based directly on
mainand are not dependencies of this PR:Review fixes
Checks
dune runtest test/blackbox-tests/test-cases/pkg/portable-lockdirsCI=true dune build @fmt @checkCloses #13647