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

Document how to resolve uv.lock merge conflicts #5633

Open
zanieb opened this issue Jul 30, 2024 · 7 comments
Open

Document how to resolve uv.lock merge conflicts #5633

zanieb opened this issue Jul 30, 2024 · 7 comments
Labels
documentation Improvements or additions to documentation

Comments

@zanieb
Copy link
Member

zanieb commented Jul 30, 2024

I don't know what best practice is here.

@zanieb zanieb added the documentation Improvements or additions to documentation label Jul 30, 2024
@LennyN95
Copy link

LennyN95 commented Nov 7, 2024

I came across this problem. We found that the lock files may differ greatly across branches during active development and that it's usually to complex for automatic conflict resolution. However, it seems more plausible to generate the lock file after merging branches rather than before.

What first came to my mind was to avoid pushing local lock files and create them as part of the CI pipeline on the main branch before running the tests, and commit the lock file when all tests pass.

@zanieb
Copy link
Member Author

zanieb commented Nov 7, 2024

In brief the current recommendation is:

  • Attempt to merge the parent into your branch, encounter a merge conflict in the lockfile
  • Checkout the lockfile from the parent git checkout <parent> -- uv.lock
  • Lock again uv lock

@BenGale93
Copy link

I find that the most common source of conflict is the version number of the package itself. Easy to deal with but generates conflicts when it doesn't really need to. Is there any plan to mitigate this?

@zanieb
Copy link
Member Author

zanieb commented Dec 12, 2024

Are you using a dynamic package version or does it just change a lot?

@BenGale93
Copy link

Good point, I'm picking up the version number dynamically from the git tags. I assume it's impossible to avoid this issue and keep git tags as the single source of truth?

@BenGale93
Copy link

Just found #7533 which covers it. Sorry for wasting your time @zanieb!

@zanieb
Copy link
Member Author

zanieb commented Dec 12, 2024

👍 yep that's the issue to track. No problem :)

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

No branches or pull requests

3 participants