Skip to content

refactor: Extend the file-api model to account for specific versions - #1012

Open
LecrisUT wants to merge 11 commits into
scikit-build:mainfrom
LecrisUT:file-api
Open

LecrisUT wants to merge 11 commits into
scikit-build:mainfrom
LecrisUT:file-api

Conversation

@LecrisUT

@LecrisUT LecrisUT commented Mar 6, 2025

Copy link
Copy Markdown
Collaborator
  • Add a ObjectKind base class where to register the kind/version dataclasses
    • Uses a different logic to pick up the appropriate type to make allowing for multi-version kinds
  • Some cosmetic nitpicks
    • Move common to be a private module. All public modules now mirror a specific object kind

Depends-on: #1271
Depends-on: #1272

@LecrisUT
LecrisUT requested a review from henryiii March 6, 2025 12:34
@LecrisUT
LecrisUT force-pushed the file-api branch 4 times, most recently from bfe04b1 to 2bdd65a Compare March 11, 2025 15:49
@LecrisUT

Copy link
Copy Markdown
Collaborator Author

I guess this is ready for review. I tried to consider versioned dataclasses, but the lack of kw_only is blocking it. I have tried to backport it, but no luck on either the logic or mypy.

Comment thread src/scikit_build_core/file_api/_cattrs_converter.py Outdated
@LecrisUT LecrisUT changed the title feat: Parse CMake file-api during configuration [WIP] Tighten file-api dataclasses Mar 14, 2025
@LecrisUT
LecrisUT marked this pull request as draft March 14, 2025 13:06
henryiii pushed a commit that referenced this pull request Mar 28, 2025
Cherry-picked from #1012

Signed-off-by: Cristian Le <git@lecris.dev>
@LecrisUT
LecrisUT force-pushed the file-api branch 2 times, most recently from 4ea0dae to e7a8d81 Compare April 23, 2026 10:17
Signed-off-by: Cristian Le <git@lecris.dev>
@LecrisUT

Copy link
Copy Markdown
Collaborator Author

🎉 finally making progress on this and proof of concept with cmakeFiles seems to work (locally at least?). Preliminary review would be great while tracking down the failures

@LecrisUT
LecrisUT marked this pull request as ready for review April 23, 2026 15:00
@LecrisUT LecrisUT changed the title [WIP] Tighten file-api dataclasses refactor: Extend the file-api model to account for specific versions Apr 23, 2026
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

Copy link
Copy Markdown
Collaborator Author

Note to self:

  • cattrs version would need to be bumped to use struct_hook in override
  • python 3.8 failure needs type -> Type

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.

2 participants