Skip to content

Use resolveAsync in terminal Variable Resolver #120328

Closed
@alexr00

Description

@alexr00

With #108804 we are trying to remove process.env from the configuration resolver service. The new way to get the environment is async and requires that the all the configuration resolver methods be async. I have started the adoption of the new async methods in #120326, but there's one use in terminal that looks like it will require more work:

export function createVariableResolver(lastActiveWorkspace: IWorkspaceFolder | undefined, configurationResolverService: IConfigurationResolverService | undefined): VariableResolver | undefined {
if (!configurationResolverService) {
return undefined;
}
return (str) => configurationResolverService.resolve(lastActiveWorkspace, str);
}

Option 1: Convert that use of resolve to use resolveAsync.
Option 2: I provide a new resolveWithEnv method on the configuration resolver service that is sync, but requires you to pass in your own IProcessEnvironment.

Which option makes the most sense here?

Metadata

Metadata

Labels

debtCode quality issuesimportantIssue identified as high-priorityinsiders-releasedPatch has been released in VS Code Insidersperf-startupterminalGeneral terminal issues that don't fall under another label

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions