Deleting lock file, in combination with --remove-untracked
, causes packages to be removed during install
#4465
Closed
3 tasks done
Labels
area/cli
Related to the command line
kind/bug
Something isn't working as expected
status/confirmed
Issue is reproduced and confirmed
status/triage
This issue needs to be triaged
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: Ubuntu 18.04
Poetry version: 1.1.8
Issue
In my workflow I need to remove lock file before running
poetry install
(so essentially Poetry does dependency resolution form scratch). I also use--remove-untracked
flag.My dependencies are as follows (though I don't think it matters what the actual dependencies are):
On the first run, in all installs properly:
Upon repeating the same commands, however, it ends up removing the dependencies (while it generates an identical lock file to the one I deleted)!
which then obviously fails since all the dependencies are missing. It then goes in a circle - next run installs the packages, and the following removes them again. Re-running with
-vvv
gives a hint as to what may be happening:It appears that it first removes the packages, and then tries to install the same packages but decides to skip as it thinks they are already installed, while in fact it just removed them. It shouldn't remove these packages in the first place.
The only workaround I can think of for now would be to stop using
--remove-untracked
option.Thanks.
The text was updated successfully, but these errors were encountered: