Skip to content

Conversation

@teruokun
Copy link

With the new internal environments used for hatch test, hatch fmt, and the internal uv installation, this allows for accounting for the internal environments with --all or by name when updating the constraint files for those environments.

@juftin
Copy link
Owner

juftin commented Jul 17, 2024

Oh nice, this looks great. This project does quite a bit to maintain compatibility with hatch>=1.7,<2.0 - could you add a conditional check on the hatch version before adding the --internal flag to maintain backwards compatibility?

@teruokun
Copy link
Author

Sure, I had originally thought about doing that but hesitated since it added more complexity to the overall logic so I thought I'd go simple first, but it should be relatively straight-forwards. I'll try to get that done today

@teruokun
Copy link
Author

Alright, the updates do a parametrize on the mocked cli tests and adds in the hatch version check (wasn't sure if there was already a utility for that or not, but if there is I'm happy to not re-invent it)

@teruokun
Copy link
Author

@juftin can you take a look at the newest revision?

@valentinoli
Copy link
Contributor

@juftin

Just noticed this open PR. My two cents: I observe that in the latest version of Hatch, the --internal flag has no effect when used in combination with --json. In fact, when --json is provided, all environments are returned including internal ones. See Hatch source code: https://github.com/pypa/hatch/blob/master/src%2Fhatch%2Fcli%2Fenv%2Fshow.py#L36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants