microsoft / vscode

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

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

Open aeschli opened 4 years 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 8 months ago

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