Skip to content

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

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

Closed
DanTup opened this issue Mar 6, 2025 · 0 comments

Comments

@DanTup
Copy link
Member

DanTup commented Mar 6, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant