`pixi --strict` mode
Problem description
Having this pixi.toml as an example:
[environments]
default = { features = ["py312"], solve-group = "py312" }
py312 = { features = ["py312"], solve-group = "py312" }
py311 = ["py311"]
py310 = ["py310"]
py39 = ["py38"]
py38 = ["py38"]
and executing pixi run or pixi install I will receive the following error:
WARN The feature 'py39' is defined but not used in any environment which is totally fine.
My suggestion is to introduce a sort of strict mode for pixi, which will error when the feature is not used in any environment, which will help to catch these typos.
I think we should be conservative when adding new options. However, maybe we could just error here?
good point - but I think it could be a potential breaking change for users that have unused features, and after running pixi self-update or having setup-pixi: latest CI will receive some red pipelines
Optional dependencies in pyproject.toml are interpreted as features. There are likely situations where not having an environment for each feature is desired. So defaulting to erroring could be an issue I think?
I feel like the current warning is a good middle ground for most use cases. A strict mode / check command may help in some other situations
I rather have something like pixi lint to error on non functional warning level feedback. This issue is not big enough to keep open for me. If there are more concrete ideas on how to fix this on a bigger level please open a new Issue.