-
Notifications
You must be signed in to change notification settings - Fork 147
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
Risk of outdated Pipfile.lock after editing Pipfile. #9
Comments
I think this would be pretty trivial to detect, just bake a hash of the |
Good idea, actually. I'll keep this issue open until this is implemented ;) |
This of course runs the risk of getting an "outdated" false positive for non-semantic changes like adding a comment or something. If we get to a place that it's possible to safely parse the |
Also it may be useful to store the hash of lock file itself, along with the hash of Pipfile data |
Having a hash in Example 1:
Example 2:
Example 3:
The only way around that would be to tell people to never ever commit their |
@jayfk Is resolving a one-line merge conflict really that big of a deal nowadays with GitHub's web interface for conflict resolution? Valid point though. Maybe the hash could be external to the file and not committed? |
@SethMichaelLarson the problem is you need to recalculate the hash every time since both hashes are incorrect at the time you merge your feature branch. |
@jayfk So it's possible to get around that by doing something like instead of a hash, baking the contents of So I guess it comes down to whether taking up extra disk space by duplicating all of the contents of the |
Using this approach, the main benefit is that a human is able to resolve the merge conflict pretty easily. Using a hash requires you to resolve the merge conflict locally by regenerating the |
IMO despite fixing conflicts in
These files must be in vcs, otherwise they are useless, aren't they? |
Isn’t this sort of things caught by running tox before pushing? |
I don't see this as a problem at all, my workflow is similar to what I think Pipfile wants to achieve. |
|
Pipenv auto-locks after you modify the Pipfile. |
This has been fine, in practice. |
In addition #8, this is perhaps the most serious usability problem with the current approach: For a developer it is very easy to forget about
Pipfile.lock
after editingPipfile
, especially because he is not supposed to care about the lock file.This is not an issue with pure approaches (
setup.py
orrequirements.txt
) because there is only one version of truth. Pipfile introduces an intermediate step that translates one truth into another, and different tools look at different files. This just asks for trouble. I can already see the broken builds and "fix: Forgot to build Pipfile" commits waiting to happen.A very common workflow is to install a dependency manually, check if it works, and then add it to
requirements.txt
or just callpip freeze
again. With Pidfiles, there is nopip freeze
(see #8) and you have to invoke a command-line utility after editing thePidfile
to make things happen. Unfortunately, you just manually installed the dependency, so everything works anyway (on your computer) and there is no indication that yourPidfile.lock
is out of sync if you forget this step. You are a singlegit commit -a
away from a broken build.Build or install tools (
pip
) cannot check ifPipfile
andPipfile.lock
are out of sync without executing thePipfile
(which is bad, see #7) and cannot warn the user.The text was updated successfully, but these errors were encountered: