Skip to content

feat(pkg): remove the portable lock dir distinction - #15987

Draft
Alizter wants to merge 7 commits into
ocaml:mainfrom
Alizter:push-kzlnwxvqnmlt
Draft

feat(pkg): remove the portable lock dir distinction#15987
Alizter wants to merge 7 commits into
ocaml:mainfrom
Alizter:push-kzlnwxvqnmlt

Conversation

@Alizter

@Alizter Alizter commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #15982. The final two commits are new in this draft.

Summary

  • Use conditional lock-file data for every newly generated lock directory.
  • Remove the feature flag and split portable/non-portable code paths.
  • Preserve compatibility with legacy atom-form dependencies and bare build/install actions.

Review fixes

  • Preserve each lock directory's configured platform variables and unset-variable list when constructing its solve overlays.
  • Normalize an empty requested-platform list to the canonical empty platform in new lock directories, keeping versioned package and auxiliary-file paths consistent.
  • Compare the complete location-normalized compiler package when deciding whether to relock compiler-coupled dev tools; retain the existing lock directory when the compiler package is unchanged.
  • Keep the existing detailed version-change diagnostic while using a package-change diagnostic for same-version recipe changes.
  • Remove the redundant conditional decoder fallback and obsolete portable-mode test setup.

Checks

  • dune runtest test/blackbox-tests/test-cases/pkg test/expect-tests/dune_pkg
  • CI=true dune build @fmt @check
  • Focused dev-tool, legacy-lockdir, platform-selection, solver-metadata, version-conflict, extra-files, and conflict-class regressions all pass.

@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-kzlnwxvqnmlt branch 18 times, most recently from df57136 to 4453142 Compare August 18, 2026 16:57
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Verify portable locking succeeds when every requested platform can install the dependency.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Record the duplicate-result merge failure and repeated failure diagnostics before joint solving deduplicates requested platforms.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Record that separate platform solves select distinct platform-specific avoid-version packages instead of one common alternative.

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>
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>
@Alizter
Alizter force-pushed the push-kzlnwxvqnmlt branch 2 times, most recently from 2b33de5 to 2369273 Compare August 18, 2026 17:44
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