Skip to content
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

EnvironmentVariableCollection.description only works for one extension #186859

Closed
Tracked by #20822
Tyriar opened this issue Jul 2, 2023 · 8 comments
Closed
Tracked by #20822

EnvironmentVariableCollection.description only works for one extension #186859

Tyriar opened this issue Jul 2, 2023 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release terminal-tabs verified Verification succeeded

Comments

@Tyriar
Copy link
Member

Tyriar commented Jul 2, 2023

This is the reason js-debug isn't working but git is:

getVariableMap(scope: EnvironmentVariableScope | undefined): Map<string, IExtensionOwnedEnvironmentVariableMutator[]> {
const result = new Map<string, IExtensionOwnedEnvironmentVariableMutator[]>();
this.map.forEach((mutators, _key) => {
const filteredMutators = mutators.filter(m => filterScope(m, scope));
if (filteredMutators.length > 0) {
// All of these mutators are for the same variable because they are in the same scope, hence choose anyone to form a key.
result.set(filteredMutators[0].variable, filteredMutators);
}
});
return result;
}
getDescriptionMap(scope: EnvironmentVariableScope | undefined): Map<string, string | undefined> {
const result = new Map<string, string | undefined>();
this.descriptionMap.forEach((mutators, _key) => {
const filteredMutators = mutators.filter(m => filterScope(m, scope, true));
if (filteredMutators.length > 0) {
// There should be exactly one description per extension per scope.
result.set(filteredMutators[0].extensionIdentifier, filteredMutators[0].description);
}
});
return result;
}

This is probably a good candidate for recovery, not a good reason to push 1.80.0 out though.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal-tabs labels Jul 2, 2023
@Tyriar Tyriar added this to the July 2023 milestone Jul 2, 2023
Tyriar added a commit that referenced this issue Jul 2, 2023
@Tyriar Tyriar added the candidate Issue identified as probable candidate for fixing in the next release label Jul 2, 2023
@Tyriar
Copy link
Member Author

Tyriar commented Jul 3, 2023

Fixed in main #186861

@karrtikr
Copy link
Contributor

Thanks for taking care of it while I was out! Can this be closed?

@Tyriar
Copy link
Member Author

Tyriar commented Jul 10, 2023

@karrtikr this one's going into the recovery build, didn't quite make the cut for 1.80.0.

Tyriar added a commit that referenced this issue Jul 10, 2023
@Tyriar Tyriar closed this as completed Jul 10, 2023
@meganrogge meganrogge added the verified Verification succeeded label Jul 12, 2023
@meganrogge
Copy link
Contributor

@karrtikr verified that JavaScript debug terminals are getting the expected env - can you pls lmk what the repro steps were here?

@karrtikr
Copy link
Contributor

You can add the following setting to activate description for Python ext: "python.experiments.optInto": ["pythonTerminalEnvVarActivation"] in User settings and reload.

After which, if you select a virtual environment (Python: Select Interpreter), it should use env collection to activate terminal with appropriate description, something like:

image

Description is the "Enable Nodejs..." string next to "Javascript debugger:", it appears when hovering over the terminal label.

@meganrogge
Copy link
Contributor

Screenshot 2023-07-12 at 10 18 02 AM

@karrtikr
Copy link
Contributor

Seems to work 👍

@Tyriar
Copy link
Member Author

Tyriar commented Jul 13, 2023

The actual verify steps for this is to ensure 2 list items appear in the same section. Verified below.

Insiders:

image

Stable:

image

@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release terminal-tabs verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants