Repository navigation
feat: map config-settings to dynamic-metadata plugin settings - #1632
Merged
Merged
Conversation
A plugin setting can be `{config-setting = "name"}`, the same form as
`cmake.define`. The resolved value replaces the reference before any
provider hook is called, so the provider protocol does not change.
Assisted-by: ClaudeCode:claude-fable-5-2
Replace the inline `{config-setting = "name"}` value with a
`config-settings` table in each `[[tool.dynamic-metadata]]` entry. The
static value stays as the fallback, and the key is never passed to a
plugin. The legacy `tool.scikit-build.metadata` table is not supported.
Assisted-by: ClaudeCode:claude-fable-5-2
The dynamic-metadata spec reserves `tool` in each entry, with one table per backend. Read the mapping from `tool.scikit-build.config-settings`, ignore the tables of other backends, and never pass `tool` to a plugin. Assisted-by: ClaudeCode:claude-fable-5-2
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
GetRequires() now reads the resolved dynamic-metadata entries, so it agrees with GetRequires.from_config_settings(). A mapping needs minimum-version 1.2 or later when a minimum is set. The project-table command uses SettingsReader, so it rejects unknown config-setting names as a build does. Assisted-by: ClaudeCode:claude-fable-5-2
henryiii
marked this pull request as ready for review
November 23, 2026 22:15
Match the singular spelling used by the declaration table, defines, overrides, and format keys. Assisted-by: ClaudeCode:claude-opus-5-5
This was referenced Nov 25, 2026
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.
🤖 AI text below 🤖
Alternative to #1631 for #1608.
A
[[tool.dynamic-metadata]]entry can map plugin settings to package-declared config-settings with atool.scikit-build.config-settingstable in the entry:The plugin receives
variant = "cu130"as if it was written in the entry. The provider protocol does not change, so plugins stay backend-agnostic.-C> declaration default).settingsreceive it:dynamic_metadata,get_requires_for_dynamic_metadata, anddynamic_wheel.toolkey is never passed to a plugin. Tables of other backends in it are ignored.providerortool. An undeclared setting, a value that is not a string, and an unknown key intool.scikit-buildare errors.scikit-build build project-tableapplies the mapping and has a new-Coption.Known limits:
toolkey for backends in feat: reserve tool entry key for build backends dynamic-metadata#121. The spec does not check its contents, so all validation is here. A backend on the earlier spec passestoolto the plugin.tool.scikit-build.metadatatable does not support the mapping.dynamic_wheel.