-
-
Notifications
You must be signed in to change notification settings - Fork 360
Allow dependency groups in builder and non-dev envs #2155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow dependency groups in builder and non-dev envs #2155
Conversation
1eee16a to
e05a30d
Compare
The intention should be that dependency groups should work without having to set as a builder environment because this should follow the spec from the PEP for dependency groups. I am going to take a deeper look at this within the next couple of days. @lwasser Thank you for testing out this change! this will help for us to make sure we get the right fix for this to match what the documentation suggests which is correct that dependency-groups should work for any environment. |
|
@cjames23 of course. I'm happy to test again. We have a packaging template that uses hatch. And we will be teaching with it this spring. Our tests started to fail and it turns out this is the culprit! So our community is happy to be a test bed as this pr moves forward! ✨ |
|
After taking a look I think I actually know what the change likely needs to look like Should become The critical line is the change to |
|
@br3ndonland let me know if you want to make the additional change from the comment I made in this PR, otherwise I can create a separate PR that addresses everything. |
Update the conditional check for dev_mode to include features or dependency groups.
|
@lwasser With the committed change I made to this PR, would you like to test those changes and see if that resolves the issue? |
* Allow dependency groups in builder and non-dev envs * Un-parametrize dependency group test * Update dev_mode check to include features and dependency groups Update the conditional check for dev_mode to include features or dependency groups. --------- Co-authored-by: Cary Hawkins <[email protected]> e33e232
* Allow dependency groups in builder and non-dev envs * Un-parametrize dependency group test * Update dev_mode check to include features and dependency groups Update the conditional check for dev_mode to include features or dependency groups. --------- Co-authored-by: Cary Hawkins <[email protected]> e33e232
|
Thank you all for the work on this. I'll test it out this week!! |
|
Hi everyone. Just a quick note that I was able to test this out today and it's working well. Thank you again for the speedy patch. We will watch for a new release!! |

Description
Fixes #2152
Dependency groups do not install in Hatch environments where
builder = trueordev-mode = false.The 1.16.0 changelog entry says "any environment now may be used for building." It would therefore be helpful to support dependency groups in any environment.
Changes
Currently, the
dependencies_complexproperty onEnvironmentInterfaceignores dependency groups ifself.builderornot self.dev_mode.This PR will adjust the
dependencies_complexproperty onEnvironmentInterfaceso that it includes dependency groups regardless ofself.builderorself.dev_mode.The corresponding unit test will be updated to include
builderanddev_modein thepyproject.tomlenvironment configuration.Related
hatch -e <env> runstopped working with v1.16.0: "Environment ... is not a builder environment" #2113