microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.41k stars 29.33k forks source link

default values missing for workspace.getConfiguration().get in resolver #88044

Closed aeschli closed 18 hours ago

aeschli commented 4 years ago

On master:

outputChannel.appendLine(JSON.stringify(vscode.workspace.getConfiguration('testresolver').inspect('startupDelay')));
outputChannel.appendLine(JSON.stringify(vscode.workspace.getConfiguration('testresolver').inspect('startupError')));

Same when accessing workspace.getConfiguration('testresolver).get('startupDelay')

I have the same problem in the Remote WSL extension.

sandy081 commented 4 years ago

This is because resolver extensions are activated even before their contributions are scanned.

@alexdima FYI

sevillal commented 3 years ago

@alexdima is there any plan to fix this?

legomushroom commented 3 years ago

Hit this in the GH Codespaces extension recently, since it is a resolver extension, the setting default is not present before the connection is fully established 😊 Worked around this by adding the default in the JS code, not ideal since could diverge with the package.json value at some point, but works for now 👍

vanowm commented 10 months ago

Perhaps if there was some kind of event or promise which we can use to wait for it to finish loading?

sandy081 commented 18 hours ago

/duplicate

This is now fixed using #224236

vs-code-engineering[bot] commented 18 hours ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!