Make config synchronously available to extensions
Created by: sqs
Extensions currently must wait until after activate()
is called to get the configuration. The configuration is not synchronously available. So a lot of extensions have workarounds like:
export async function activate(): Promise<void> {
// HACK: work around configuration not being synchronously available
await new Promise(resolve => setTimeout(resolve, 100))
...
This is documented in sourcegraph.d.ts:
* @todo This function throws an error if it is called synchronously in the extension's `activate`
* function. This will be fixed before beta. See the test "Configuration (integration) / is usable in
* synchronous activation functions".
*
This issue tracks removing this limitation.