#I’m a bit stumped: shouldn’t this work?
1 messages · Page 1 of 1 (latest)
the only thing I can think of is that it's somehow loading the wrong config
i.e. it works for me
Yeah only happens in one project one one of my machines, but I have no clue why that could be and how to debug it
The behavior survives recreating the env
try hatch env show
Ah, the reason was that I also had a hatch.toml
It didn’t mention the default env (configured in pyproject.toml) at all, yet the file’s existence caused the default env configuration in pyproject.toml to be ignored
oh I see
It’s surprising that hatch.toml existing overrides the tool.hatch.envs.default table in pyproject.toml
shall I file a bug?
OK, so having envs in both is the cause
This continues to be surprising and not practical to me
I’d prefer if there was a way to have project-specified envs in addition to a way to surgically modify them
The intuitive way to do that would be that pyproject.toml is checked in and contains the project-defined envs, while hatch.toml is .gitignored and allows to override individual fields in the envs
But I’d be OK with any other way to achieve that
would you prefer an error for duplicate top level keys?
More like a blessed way to merge/override configuration at a deeper level.
If that gets introduced together with an error, that works, but an error without it would make it impossible to override anything.
can you give a concrete example to help me better understand?