question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make the lock file more merge-friendly

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

When two devs install dependencies on separate branches, it is very easy to end up merge-conflicted, in particular, the metadata.content-hash key often changes. It is very unclear how to resolve this manually, so I often delete the lockfile (or perhaps just that key) and rebuild it and, basically, hope that it comes out the same.

It seems like in some scenarios that merge conflicts could be resolved automatically based on pyproject.toml. Yarn does this, for instance.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:48
  • Comments:60 (24 by maintainers)

github_iconTop GitHub Comments

26reactions
lephuongbgcommented, Nov 26, 2020

My 2 cents, if the content-hash format can be structured as a list of sorted main dependency names and hashes calculated from resolved sub-dependencies, then it would reduce merge conflict chance a lot. Like

[metadata]
content-hash = [
    "astroid:03472c30eb2c53",
    "flask:bb564576db6a918",
    #...
]
21reactions
chdsbdcommented, Dec 3, 2019

I think this is still a valid issue and should not be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In Makefile, how to cleanup lockfile files? - Stack Overflow
I would do the lock/unlock in the same target as file-maker : file.out: file.in lockfile $@.lock file-maker < $< > $@; \ status=$$?;...
Read more >
File Locking - GitLab Docs
The first thing to do before using File Locking is to tell Git LFS which kind of files are lockable. The following command...
Read more >
What is package lock json? Lockfiles for yarn & npm ... - Snyk
In this article we will discuss both npm's package lock file package-lock.json as well as Yarn's yarn.lock. Package lock files serve as a ......
Read more >
Locking dependency versions - Gradle User Manual
Dependency locking makes sense only with dynamic versions. It will have no impact on ... See the description on updating lock files for...
Read more >
Lock File | Developer Experience Knowledge Base
Many people decide to ignore the lock files and they do not commit it to Git. ... The package managers need more than...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found