Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullify positions of the extensions fields in OpamFile.OPAM.effective_part #6029

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

kit-ty-kate
Copy link
Member

@kit-ty-kate kit-ty-kate commented Jun 18, 2024

Fixes #6028

Prior to #5636, opam did not traverse the extension fields when testing equality.
Prior to ocaml/opam-repository#25861, very few packages actually had the x-env-path-rewrite field so the problem did not occur.
Users with a fresh install cache saved after an install will also not immediately notice this issue (see #6031)

The issue was that the extension field carries all the positions of the original file and opam files of installed packages are saved in their normalised form which changes the positions of the fields, so when OpamFile.OPAM.effectively_equal is called it would see a difference in the extension field.

…take the location of the fields into account
Copy link
Collaborator

@rjbou rjbou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ta!

@dra27 dra27 merged commit 1d74d8b into ocaml:master Jun 19, 2024
28 of 29 checks passed
@rjbou
Copy link
Collaborator

rjbou commented Jun 19, 2024

Failing CI is from benchmark test broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opam upgrade keeps wanting to recompile ocaml
3 participants