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

Fix lock behaviour with upgrade #5080

Merged
merged 9 commits into from
May 20, 2022
Merged

Fix lock behaviour with upgrade #5080

merged 9 commits into from
May 20, 2022

Conversation

rjbou
Copy link
Collaborator

@rjbou rjbou commented Mar 3, 2022

Lock files are ignored in the upgrade check / process
fix #4936

### opam upgrade --locked
The following actions will be performed:
-  - recompile tolock l1 (pinned) [upstream or system changes]
+  - upgrade tolock l1 to l2 (pinned) 

The issue was that there is no information about opam file origin. if it was a locked one, update & upgrade does their dependency computation according the regular opam file. The solution was to store the origin information (an x-locked field in opam file, to not change its format), With that, update and upgrade are able to automatically update and upgrade from locked file if found if opam file originate from a lock file.
In this PR also, there were some rework of pin types/functions.

@rjbou rjbou added the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Mar 3, 2022
@rjbou rjbou added this to the 2.2.0~alpha milestone Mar 3, 2022
@rjbou rjbou added this to PR in progress in Opam 2.2.0 via automation Mar 3, 2022
src/state/opamUpdate.ml Outdated Show resolved Hide resolved
@rjbou rjbou moved this from PR in progress to PR to review in Opam 2.2.0 Mar 3, 2022
@rjbou rjbou mentioned this pull request Mar 3, 2022
@rjbou rjbou removed the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Mar 3, 2022
@rjbou rjbou added the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Apr 19, 2022
src/client/opamClient.ml Outdated Show resolved Hide resolved
@rjbou rjbou force-pushed the lock-upgrade branch 2 times, most recently from 66603d9 to 87c296a Compare May 10, 2022 08:25
@rjbou rjbou removed the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label May 10, 2022
@rjbou rjbou force-pushed the lock-upgrade branch 2 times, most recently from 571ebb6 to 9db616d Compare May 19, 2022 15:35
@rjbou rjbou moved this from PR to review to PR finalised (merge with CI) in Opam 2.2.0 May 19, 2022
@rjbou rjbou merged commit a3f102a into ocaml:master May 20, 2022
Opam 2.2.0 automation moved this from PR finalised (merge with CI) to Done May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Opam 2.2.0
  
Done
Development

Successfully merging this pull request may close these issues.

Invalid_argument("String.sub / Bytes.sub") crash during pinning
2 participants