-
-
Notifications
You must be signed in to change notification settings - Fork 361
Description
Description
I would like to add a configuration option to specify a minimum hatch version to parse the configuration, similar to the way it can be done for Python in the pyproject.toml:
[project]
requires-python = ">=3.12"Maybe the >= can simply be assumed and then the option could be
[tool.hatch]
requires = "1.16.2"Likely, hatch should evaluate this option first thing and produce a simple error message prompting the user to upgrade hatch if needed.
Use case/motivation
As hatch is accumulating more features, older versions will not know how to interpret them. When such configuration features are critical, it is desirable to alert users to that fact and avoid processing a command. As an example, hatch recently started supporting dependency groups. When I define an environment with dependency groups and use hatch==1.14 to create the environment, the environment is created successfully, but dependency groups are silently ignored and the dependencies are not installed. That behavior is logical to someone following hatch development but is extremely surprising to the average project contributor. Stating the minimum required hatch version in a contribution guide is likely not strong enough.
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow the Python Software Foundation's Code of Conduct