Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Updates to environment collection workspace API #182238
Updates to environment collection workspace API #182238
Changes from all commits
f9a7029
b90dd82
44ccada
df10286
69ce8fc
436a801
a2b0106
16a8093
76f8b2c
4a0d85d
0a521c6
0185d27
3a4c2b1
88799ca
affca3b
0874a6a
5749e3d
616fa57
db774ad
64ee37a
c2df3b7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing you just haven't got around to removing the
scope?
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me clarify my design, where I have no plans of removing
scope
internally.EnvironmentVariableCollection
class is used only created once for each extension and then is passed around, that carries information for all the scopes. Asscope
is not present inconstructor
, it is present in each method in the class as a parameter; We should probably rename it toExtensionOwnedEnvVarCollection
.The external
vscode.EnvironmentVariableCollection
is different from this, it does not havescope
as a parameter.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little confusing as they are by definition owned by an extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can go something like the following if it's already clear that they're for a specific extension:
MergedExtensionEnvVarCollection
GlobalEnvironmentVariableCollection
ExtensionSpecificEnvironmentVariableCollection
Basically we want to indicate that it is a unified environment variable collection carrying information for all scopes, for a specific extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExtensionOwnedEnvVarCollection
seemed appropriate as it is being used exactly that way in here:vscode/src/vs/platform/terminal/common/environmentVariableCollection.ts
Line 18 in 9b59b96
IExtensionOwnedEnvironmentVariableMutator
(s) came fromExtensionOwnedEnvVarCollection
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IExtensionOwnedEnvironmentVariableMutator
is just a mutator object but with the extension id attached. The environment variable collection is extension owned, but the mutator objects are owned by the collection and usually lack this property.UnifiedEnvironmentVariableCollection
is my favorite, but I'm not sure we should be renaming it as I believe it's only not-unified in the extension API. Adding "unified" throughout all usages wouldn't add muchThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like
MergedExtensionEnvVarCollection
because that's what it is, but I agree it probably wouldn't add much. I'll add comments clarifying where it is defined.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's confusing though, merged environment variable collection is already a thing and the merging there means there is only a single value per mutator type + variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could remove the "Merge" part,
ExtensionEnvironmentVariableCollection
. I'll add comments regardless clarifying.