Skip to content

Add a has_fixed_supported_configs plugin property#115

Closed
mgorny wants to merge 1 commit into
devfrom
plugin-build-use
Closed

Add a has_fixed_supported_configs plugin property#115
mgorny wants to merge 1 commit into
devfrom
plugin-build-use

Conversation

@mgorny
Copy link
Copy Markdown
Collaborator

@mgorny mgorny commented Sep 8, 2025

Add a has_fixed_supported_configs that indicates whether get_supported_configs() always returns a fixed list that does not depend on the system state. Only plugins featuring this flag can be used with plugin-use = "build".

Add a `has_fixed_supported_configs` that indicates whether
`get_supported_configs()` always returns a fixed list that does not
depend on the system state.  Only plugins featuring this flag can be
used with `plugin-use = "build"`.

Signed-off-by: Michał Górny <mgorny@quansight.com>
@mgorny
Copy link
Copy Markdown
Collaborator Author

mgorny commented Sep 8, 2025

I think it ended up simpler than I expected it to be.

@konstin
Copy link
Copy Markdown

konstin commented Sep 9, 2025

What about calling this plugin-use instead, and plugins can declare what modes they are compatible with, with the default (when you don't set the attribute) being that the plugin reads system state and needs to run on installation?

@mgorny
Copy link
Copy Markdown
Collaborator Author

mgorny commented Sep 10, 2025

I'm not sure if we can express it "right". The two have quite a different model:

  • plugin-use = "none" doesn't use plugin at all, so depending on how you look at it, it's "never" or "always" supported by a plugin
  • plugin-use = "build" is valid only for specific subsets of plugins that are guaranteed to return fixed get_supported_configs(), so we can safely call it in the build system, and expect to return the same thing as on the final install system
  • plugin-use = "all" is always valid, since all plugins provide both functions

I mean, you could technically say "I want my plugin used only at a build time", but that's an arbitrary "political" restriction, not a technical limitation, and I'm not convinced we should go this way.

So basically a "supported plugin-use" would always be either:

  • {"build", "all"}
  • {"all"}

@konstin
Copy link
Copy Markdown

konstin commented Sep 10, 2025

Make sense!

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.

3 participants