Dependency Extras Are Unnecessary & Illogically Removed After Adding #2494
Labels
area/cli
Related to the command line
area/solver
Related to the dependency resolver
kind/bug
Something isn't working as expected
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: MacOS Catalina 10.15.4
Poetry version: 1.0.5
Issue
Hello, I am working on a project that is experiencing odd "extra" dependency removals. At a high level, I have noticed "extras", that are explicitly written within the
pyproject.toml
file, are removed whenever I add a new dependency. For security/privacy purposes, I will only be pasting in some sections of the code.pyproject.toml
:poetry.lock
contains package-a and bothapp
andboto
as dependencies. I was happy with this initial state.When I go to add a new dependency, e.g. Django (could be anything for that matter), I am seeing this within the poetry output:
poetry add django -vv
It has no logical reason to remove
boto
, but it does and does not explain anything related toboto
within the very verbose output.Surprisingly, when I lock down the version of
package-a
to NOT use caret specification (like so):pyproject.toml
:And I proceed to add
django
the same way I did above. It doesn't removeboto
! It respects the extra when I don't use carets to note the applicable package version updates.For what its worth, this issue also holds when I use multiple requirements like so:
pyproject.toml
:--
In summary, I can't understand why package extras are deemed removable when I use caret specification. I find this to be somewhat similar to the other issues, but certainly with its unique set of characteristics.
The text was updated successfully, but these errors were encountered: