bug: Properly handle Union in file-api#1272
Open
LecrisUT wants to merge 2 commits intoscikit-build:mainfrom
Open
bug: Properly handle Union in file-api#1272LecrisUT wants to merge 2 commits intoscikit-build:mainfrom
LecrisUT wants to merge 2 commits intoscikit-build:mainfrom
Conversation
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
3 tasks
LecrisUT
commented
Apr 23, 2026
Comment on lines
-60
to
+63
| codemodel_v2: Optional[CodeModel] | ||
| cache_v2: Optional[Cache] | ||
| cmakefiles_v1: Optional[CMakeFiles] | ||
| toolchains_v1: Optional[Toolchains] | ||
| codemodel_v2: Optional[CodeModel] = None | ||
| cache_v2: Optional[Cache] = None | ||
| cmakefiles_v1: Optional[CMakeFiles] = None | ||
| toolchains_v1: Optional[Toolchains] = None |
Collaborator
Author
There was a problem hiding this comment.
Because this part is also touching the logic of Optional I think we should check what exactly should be done here?
These very much depend on the query used. Any suggestion on how these should be handled ideally?
One thing I would want is to drop the _v suffix there and make it completely version independent, but technically I think they are allowed to have multiple such fields. I think we could fix a specific query format that is allowed and that we parse
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.
Previously only the first type was considered, but evidently that can potentially fail. Seems like this would only happen in one case
scikit-build-core/src/scikit_build_core/file_api/model/directory.py
Line 25 in db72d46