-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
python-poetry/poetry-core
#542Labels
area/pyprojectMetadata/pyproject.toml-relatedMetadata/pyproject.toml-relatedkind/featureFeature requests/implementationsFeature requests/implementations
Description
- Poetry version: 1.3.1
- Python version: 3.9.15
- I am on the latest stable Poetry version, installed using a recommended method.
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have consulted the FAQ and blog for any relevant entries or release notes.
Issue
To give an example, with a pyproject.toml like
[tool.poetry]
name = "test"
[tool.poetry.dependencies]
numpy = { version = "^1.20.0", optional = true }
[tool.poetry.extras]
my_extra = ["numpy "]
poetry lock, poetry check and poetry install -E my_extra all run without any error or anything. But they wouldn't install the numpy dependency. This is because there's an extra space in my_extra = ["numpy "] that means the extra isn't matched to the dependency. This would happen with any misspelling in the my_extra list. So poetry just silently ignores entries in extras that can't be matched to a dependency.
The poetry.lock file would just have a sections like
[extras]
my_extra = []
in this case.
It'd be nice to at least get a warning in poetry lock or poetry check when an extra item doesn't match a dependency. These types of errors can be hard to spot and can take a while to figure out.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/pyprojectMetadata/pyproject.toml-relatedMetadata/pyproject.toml-relatedkind/featureFeature requests/implementationsFeature requests/implementations