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

Consider unifying per-subsystem annotation providers #2428

Open
mhutch opened this issue May 14, 2024 · 0 comments
Open

Consider unifying per-subsystem annotation providers #2428

mhutch opened this issue May 14, 2024 · 0 comments
Labels
Design Powderhouse Work to isolate parser and features

Comments

@mhutch
Copy link
Member

mhutch commented May 14, 2024

In Powderhouse, IAnnotationProvider annotation providers are currently per-subsystem. This makes sense - a developer may wish to author or use a provider that provides help descriptions, which would naturally belong with the help subsystem, and another provider that provides default values, which would naturally belong with the default values subsystem.

However, it gets more complicated when we consider that some annotations may be used by multiple subsystems. For example, the completion subsystem uses the help description as the description for completion items. In the scenario above, if the completion subsystem were to use GetAnnotation(symbol, HelpAnnotations.Description) on itself, it would not get the description from the annotation provider on the help subsystem.

The completion subsystem could obtain a reference to the help subsystem and call helpSubsystem.GetAnnotation(symbol, HelpAnnotations.Description) or helpSubsystem.GetDescription(symbol). However, it may not be obvious to subsystem authors that they need to do this.

Another option would be to only have a single annotation provider for use by all the subsystems in the pipeline. Developers who wish to have multiple providers would then need to create a single aggregated provider.

@mhutch mhutch added Powderhouse Work to isolate parser and features Design Design and removed Design labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Powderhouse Work to isolate parser and features
Projects
None yet
Development

No branches or pull requests

1 participant