Skip to content

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Nov 10, 2022

What's the problem this PR addresses?

The current merge conflict resolution algorithm is nice because it operates using only the conflict markers that Git puts into the files, but it has several drawbacks:

Closes #2583
Closes #5041

How did you fix it?

This diff reimplements the merge conflict auto-resolver to instead query the Git state. It retrieves the original variants of the lockfile, ignores the ones that don't make sense, tries to perform a couple of compatibility fixes if it knows how (useful for the lockfile v6 -> v7 migration), and merges the resulting data.

The main drawback is that the yarn install command must be run within the context of the conflicting git merge command. You cannot anymore accidentally commit the conflict, and fix it later (because then we'd lose the information telling us which commits are being merged).

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

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

Successfully merging this pull request may close these issues.

[Bug] Automerge confused by change of checksums between yarn versions
2 participants