Skip to content

refactor(pkg): retire portable lock directory mode - #15987

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

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

Depends on #16218. This remains a draft while the remaining lock-directory differences are consolidated incrementally.

Summary

The current stack separates three mechanical cleanups:

  1. Normalize conditional package fields — write the conditional package-field representation while preserving legacy atom, bare-action, and bare-depext decoding.
  2. Normalize solution summaries — use one platform-aware success renderer, with a fallback for lock directories without a platform map.
  3. Remove the feature toggle — delete the configure/runtime toggle and migrate tests that relied on it to explicit solve_for_platforms entries.

Package path numbering is handled independently by #16218. This stack will be revised further as the semantic differences between the formats are isolated.

Checks

  • dune build @check @fmt
  • Focused legacy decoder, lock selection, metadata, unavailable-package, SAT, and dev-tool crams

@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 28 times, most recently from 8ffe3ca to 6412fc1 Compare August 22, 2026 19:57
@Alizter
Alizter force-pushed the push-kzlnwxvqnmlt branch 11 times, most recently from c1c277a to 1f240a2 Compare August 26, 2026 06:42
@Alizter Alizter changed the title feat(pkg): remove the portable lock dir distinction refactor(pkg): remove legacy portable lock directory mode Aug 26, 2026
@Alizter
Alizter marked this pull request as ready for review August 26, 2026 06:43
@Alizter
Alizter force-pushed the push-kzlnwxvqnmlt branch 3 times, most recently from cd73011 to 5611041 Compare August 26, 2026 11:48
@Alizter Alizter changed the title refactor(pkg): remove legacy portable lock directory mode refactor(pkg): normalize conditional lock package fields Aug 26, 2026
@Alizter Alizter changed the title refactor(pkg): normalize conditional lock package fields refactor(pkg): retire portable lock directory mode Aug 26, 2026
@Alizter
Alizter force-pushed the push-kzlnwxvqnmlt branch from 2dfd8a1 to b65d175 Compare August 26, 2026 12:48
@Alizter
Alizter marked this pull request as draft August 26, 2026 12:49
@Alizter
Alizter force-pushed the push-kzlnwxvqnmlt branch from b65d175 to 07176ff Compare August 26, 2026 13:31
Expose the current SAT decision level and cover a conflict that backjumps over an unrelated decision. Incremental deciders can use the observed decrease to invalidate cached traversal state.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Maintain undecided variables in a linked list so the solver can choose and restore them without rescanning every variable. Freeze the variable set once decisions begin, which keeps list restoration valid across backtracking.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Keep the package decider's depth-first frontier and visited roles between monotonic SAT decisions instead of walking again from the root. Reset the cached traversal when the exposed decision level shows that conflict analysis backtracked.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Treat versioned package filenames and .files directories as an independent lock-directory layout choice. The hidden DUNE_PKG_VERSIONED_LOCK_DIR_PATHS=enabled|disabled environment variable affects only newly generated lock directories; when unset, existing portable and non-portable defaults are preserved.

Readers infer the layout from package filenames and reject mixed layouts without consulting the environment. Cover both layouts with the same package solution, extra files, package digest, and build output.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Write newly generated package fields in the conditional representation regardless of how many platforms were solved. Keep legacy atom dependencies, bare build/install actions, and bare depext strings readable as unconditional values.

This changes only lock-directory encoding; platform selection, solver behavior, and command diagnostics remain unchanged.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Render every successful lock operation with the platform-aware solution summary. For legacy single-platform lockdirs, treat the complete package set as common when no platform map is present.

This removes the duplicate summary renderer without changing platform selection, solver behavior, failure diagnostics, or lock-directory layout.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Remove the configure-time and runtime portable_lock_dir toggle. Project lock generation now always takes the existing portable path, which was already the default; dev-tool locking retains its internal current-platform path.

Migrate tests that selected the removed mode to explicit solve_for_platforms entries. Solver internals and the default requested platform set remain unchanged.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter
Alizter force-pushed the push-kzlnwxvqnmlt branch from 07176ff to 1a181c1 Compare August 26, 2026 22:40
@Alizter Alizter closed this Sep 9, 2026
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