Skip to content

refactor: Move the file-api models to multi-versioned interface#1273

Open
LecrisUT wants to merge 18 commits intoscikit-build:mainfrom
LecrisUT:refactor/file-api-convert-all
Open

refactor: Move the file-api models to multi-versioned interface#1273
LecrisUT wants to merge 18 commits intoscikit-build:mainfrom
LecrisUT:refactor/file-api-convert-all

Conversation

@LecrisUT
Copy link
Copy Markdown
Collaborator

@LecrisUT LecrisUT commented Apr 23, 2026

  • Convert the object kind dataclasses to versioned types
    • codemodel
    • configureLog
    • cache
    • cmakeFiles
    • toolchains
  • Drop the logic for handling the previous approach
  • Limit the exports to the main object/versioned aliases

Depends-on: #1012

Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
@LecrisUT LecrisUT force-pushed the refactor/file-api-convert-all branch from 97aaa8e to c901f37 Compare April 23, 2026 15:52
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
@LecrisUT LecrisUT force-pushed the refactor/file-api-convert-all branch from c901f37 to d9d5199 Compare April 23, 2026 16:12
Signed-off-by: Cristian Le <git@lecris.dev>
@LecrisUT LecrisUT force-pushed the refactor/file-api-convert-all branch from d9d5199 to ecd624f Compare April 23, 2026 16:41
LecrisUT added 10 commits April 23, 2026 19:26
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
@LecrisUT LecrisUT force-pushed the refactor/file-api-convert-all branch from ecd624f to b1b345e Compare April 23, 2026 17:43
Comment on lines +59 to +74
@dataclasses.dataclass(frozen=True)
class Compiler_1_1(Compiler_1_0):
"""
..versionadded:: 4.3.0
"""

commandFragment: Optional[str] = None


@dataclasses.dataclass(frozen=True)
class Toolchain_1_1(Toolchain_1_0):
"""
..versionadded:: 4.3.0
"""

compiler: Compiler_1_1
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the format here with fresh eyes, this looks much less navigable then grouping them together. Afaik the fields are all additive in the same major although that is not stated as being a guarantee.

The main good thing here is the documentation of the fields and what version of the object kind and cmake version they are introduced.

@henryiii what are your thoughts? I am considering scrapping this approach and do only the documentation, making sure the object kind/version is easily introspected, and generalizing the loading of indirect objects (from jsonFile or equivalents)

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.

1 participant