Skip to content

Update configuration middleware to not inject values into non-objects (or non-Dart configuration) #5433

@DanTup

Description

@DanTup

For dart-lang/sdk#60259, we have two options:

  1. Request the whole editor configuration and just read the values we care about
  2. Request only the values we care about individually (editor.formatOnSave, editor.codeActionsOnSave etc.)

The first one results in all of the editor settings be included in the payload (once for global, once for each workspace folder) which isn't terrible, but also means this shows up in instrumentation logs (where it didn't before).

The second seems better, however it currently fails because we have middleware to set enableSnippets that assumes that the only configuration we ever provide is an object (eg. the dart section). When requesting editor.formatOnSave, we'll try to set a field named enableSnippets on a boolean and fail.

We should fix the middleware to be more tolerant of other settings being added in future.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions