Skip to content

Require plugins to declare their annotations #1348

@TwitchBronBron

Description

@TwitchBronBron

Require plugins to declare their annotations ahead of time so we can provide better editor help and also validation.

This is a breaking change to bsc because annotations would be validated for their existence, so perhaps it's a good candidate for v1.0?

Requirements:

  • plugins must declare all of their annotations, which include name and any arguments and their types. For future compatibility, we should support an array of signatures (even if we only support one signature at the moment).

Benefits:

  • we can provide intellisense for annotations
  • we can show diagnostics when using unknown annotations

Possible implementation:
There's a new plugin lifecycle hook where plugins can declare various settings. Perhaps something like this:

onPluginConfigure(event){
    //should this be brighterscript style code? Or json? 
    this.annotations = [
         `inline()`,
        `suite(suiteConfig as { name: string, timeout: number})`
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions