Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand GenerateResult type to include more context #5

Open
cbgbt opened this issue Sep 12, 2023 · 0 comments
Open

Expand GenerateResult type to include more context #5

cbgbt opened this issue Sep 12, 2023 · 0 comments

Comments

@cbgbt
Copy link
Contributor

cbgbt commented Sep 12, 2023

When we generate settings in a settings extension, we provide two pieces of information:

  • Any data that is already specified for the setting
  • Any data that exists for other settings that this setting depends on for generation

The GenerateResult type returned from SettingsModel::generate provides back two pieces of information:

  • Whether or not generation is complete
  • The partial or complete data that has been set so far

Using this interface, the settings API repeatedly invokes settings generators until they are all complete. This works in most cases, but it does not provide a clear picture of what is wrong if something fails. It could also be more efficient.

DoD:
Change the settings generation interface such that:

  • The generator knows whether or not its dependencies have completed their own generation
  • If the generation is not complete, it can return "hints" pointing to specific settings that need to be generated first (this can direct the settings system to try and run these dependencies first, though it does not guarantee it).
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

No branches or pull requests

1 participant