Repository navigation
fix: support conditional arrays for untyped environment overrides - #2453
Open
anshurajbisoyi98-ctrl wants to merge 4 commits into
Open
anshurajbisoyi98-ctrl wants to merge 4 commits into
anshurajbisoyi98-ctrl wants to merge 4 commits into
Conversation
Signed-off-by: Anshu Raj Bisoyi <anshurajbisoyi98@gmail.com>
Member
|
This is not really the fix I want to see for that issue, the first proposed solution is what I want to see which is adding types to all known options with some sort of backwards compatibility for a set of time before we remove that and fully enforce types |
Author
|
Thanks for clarifying. I took the second approach from the issue, but I understand you want known options typed with backwards compatibility for existing override syntax. I’ll revise the implementation in that direction. Is there an established deprecation policy I should follow for the compatibility period? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2058
Untyped environment plugin options previously accepted a single override table but rejected an array of conditional tables. This allows an array during override finalization, after plugin types are available. Each matching entry replaces the whole value, with the last matching entry taking precedence.
Typed plugin options keep their existing handling. Invalid entries report their array position, and condition validation uses the existing resolver. The documentation explains the replacement behavior, and the changelog records the fix.
Verification
hatch fmt --check: passed; 407 files formatted correctly.hatch run types:check: passed for 388 source files.git diff --check: passed.The full suite was run through the test environment's
bin/python3. Running throughbin/pythoncaused an interpreter-discovery failure intest_new_selected_python, which also reproduced on unchanged upstream. Thepython3run passed without changing that test. The newerhatch checkcommand uses a different generated lint configuration and reports existing findings; the repository's configured CI lint command passes.AI assistance
Codex assisted with investigation, implementation, regression tests and local verification.