Skip to content

fix(pkg): key conflict-class diagnostics by platform - #15989

Closed
Alizter wants to merge 11 commits into
ocaml:mainfrom
Alizter:push-xqrvnkkslqoo
Closed

Alizter wants to merge 11 commits into
ocaml:mainfrom
Alizter:push-xqrvnkkslqoo

Conversation

@Alizter

@Alizter Alizter commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #15988. Only the final commit is new in this draft.

Summary

  • Key diagnostic conflict-class holders by class and platform.
  • Match the per-platform conflict constraint used by SAT and avoid reporting rejections SAT never applied.

Tests

  • dune runtest test/blackbox-tests/test-cases/pkg/conflicts.t test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-platform-dependant-version-extra-files.t
  • dune build @fmt @check

@Alizter Alizter added the package management Dune's package management — `(pkg)` stanza, lockdirs, `dune pkg` commands label Aug 17, 2026
@Alizter
Alizter force-pushed the push-xqrvnkkslqoo branch 4 times, most recently from 168b8e3 to f1ce544 Compare August 17, 2026 11:50
Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter
Alizter force-pushed the push-xqrvnkkslqoo branch 2 times, most recently from 0c002b7 to ef65fcb Compare August 17, 2026 14:13
Alizter added 10 commits August 17, 2026 18:13
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Capture the current behavior where different requested platforms may select
different versions of the same package. The joint-solver feature updates this
expectation to the intended all-platform failure.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
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 availability and
local-package constraints in each platform environment, and minimize distinct
avoid-version package versions.

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.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Portable autolock failures bypass the command-line lock handler that normally adds the solve_for_platforms hint. Expose the hint with the solver failure and attach it in the autolock path as well, so both explicit and automatic locking explain how to request a smaller platform set.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Duplicate solve_for_platforms entries created duplicate platform roles and repeated conditional metadata. Deduplicate platform overlays before constructing the joint solve while preserving the user's first-occurrence order.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Use the conditional lock-file representation for every newly generated lock directory and remove the portable-lock-dir feature flag and split code paths.

Keep old lock directories readable: bare atom-form dependency fields decode as all-platform dependencies, and legacy bare build/install actions continue to run on every platform.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
The SAT-side conflict class constraint is per-platform, but the diagnostics
check keyed its classes map by class name only, so a class holder selected on
one platform could cause candidates on another platform to be reported as
class-conflicting, a rejection the per-platform SAT never applied. Key the
diagnostics map by (class, platform) to match.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter
Alizter force-pushed the push-xqrvnkkslqoo branch from ef65fcb to 4b6b983 Compare August 17, 2026 16:32
@Alizter Alizter closed this Aug 17, 2026
@Alizter
Alizter deleted the push-xqrvnkkslqoo branch August 22, 2026 18:20
@Alizter
Alizter restored the push-xqrvnkkslqoo branch August 22, 2026 18:21
@Alizter
Alizter deleted the push-xqrvnkkslqoo branch August 23, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package management Dune's package management — `(pkg)` stanza, lockdirs, `dune pkg` commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant