Skip to content

fix(pkg): compare compiler packages semantically - #16173

Draft
Alizter wants to merge 1 commit into
ocaml:mainfrom
Alizter:push-qvromqwnysom
Draft

fix(pkg): compare compiler packages semantically#16173
Alizter wants to merge 1 commit into
ocaml:mainfrom
Alizter:push-qvromqwnysom

Conversation

@Alizter

@Alizter Alizter commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Compare the project and dev-tool compiler packages after selecting their current-platform conditional fields and removing parser source locations.

This allows an unchanged effective compiler package to reuse its existing dev-tool lock directory while still relocking when the compiler recipe changes without a version bump. The diagnostic now distinguishes a same-version package change from an actual compiler version change.

The regression test merged in #16168 uses a sentinel to distinguish lock-directory reuse from identical regeneration and verifies that a same-version recipe change still triggers relocking.

Relationship to other package changes

This PR is based directly on main. It is independent of the joint-platform solver in #15982 and the lock-stanza environment fix in #16172; all three can be reviewed and landed independently.

Related Issue and Motivation

Follow-up to #16168. Structural package equality treated representation details and parser locations as package changes, causing unnecessary dev-tool relocking.

Checklist

@Alizter Alizter added package management Dune's package management — `(pkg)` stanza, lockdirs, `dune pkg` commands no changelog labels Aug 24, 2026
@Alizter
Alizter force-pushed the push-qvromqwnysom branch from b3cddd3 to 9b7a531 Compare August 24, 2026 13:02
@Alizter
Alizter force-pushed the push-qvromqwnysom branch from 9b7a531 to e01ff8f Compare August 24, 2026 15:15
Compare compiler package data after selecting current-platform conditional
fields and stripping parser source locations. This reuses an unchanged dev-tool
lock while still relocking for same-version recipe changes.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
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