-
Notifications
You must be signed in to change notification settings - Fork 384
Skip checking install requests for known extensions #2288
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
Changes from 4 commits
135d9fd
166db69
c71a92c
61436db
9ce949d
bf8bdc7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,131 @@ import { IJsonInstaller } from "./IJsonInstaller"; | |
|
|
||
| export class JsonInstaller extends IJsonInstaller | ||
| { | ||
| private readonly knownCommonExtensionIdsNotUsingDotnet: Set<string> = new Set<string>([ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be better to do this the other way around?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, do you mean inclusive instead of exclusive? I think that's a good idea, but I worry it would harm the adoption/usefulness of our API by only allowlisting certain extensions to use it. Worst case, I could see that coming up in an anti-competitive practice lawsuit, which concerns me. Now, maybe we could add some other way for extensions to specify they want us to do something. However, this needs to be done at activation before other extensions can run. We could ask them to ship with an additional manifest file, perhaps... though I'm not sure if we would be privy to that logic, and that risks things like protected files / bad read access, so I think I prefer this approach. Thanks for taking a look 👀 |
||
| 'vscode.bat', | ||
| 'vscode.clojure', | ||
| 'vscode.coffeescript', | ||
| 'vscode.configuration-editing', | ||
| 'vscode.cpp', | ||
| 'vscode.css', | ||
| 'vscode.css-language-features', | ||
| 'vscode.dart', | ||
| 'vscode.debug-auto-launch', | ||
| 'vscode.debug-server-ready', | ||
| 'vscode.diff', | ||
| 'vscode.docker', | ||
| 'vscode.emmet', | ||
| 'vscode.extension-editing', | ||
| 'vscode.fsharp', | ||
| 'vscode.git', | ||
| 'vscode.git-base', | ||
| 'vscode.github', | ||
| 'vscode.github-authentication', | ||
| 'vscode.go', | ||
| 'vscode.groovy', | ||
| 'vscode.grunt', | ||
| 'vscode.gulp', | ||
| 'vscode.handlebars', | ||
| 'vscode.hlsl', | ||
| 'vscode.html', | ||
| 'vscode.html-language-features', | ||
| 'vscode.ini', | ||
| 'vscode.ipynb', | ||
| 'vscode.jake', | ||
| 'vscode.java', | ||
| 'vscode.javascript', | ||
| 'vscode.json', | ||
| 'vscode.json-language-features', | ||
| 'vscode.julia', | ||
| 'vscode.latex', | ||
| 'vscode.less', | ||
| 'vscode.log', | ||
| 'vscode.lua', | ||
| 'vscode.make', | ||
| 'vscode.markdown', | ||
| 'vscode.markdown-language-features', | ||
| 'vscode.markdown-math', | ||
| 'vscode.media-preview', | ||
| 'vscode.merge-conflict', | ||
| 'vscode.microsoft-authentication', | ||
| 'ms-vscode.js-debug', | ||
| 'ms-vscode.js-debug-companion', | ||
| 'ms-vscode.vscode-js-profile-table', | ||
| 'vscode.builtin-notebook-renderers', | ||
| 'vscode.npm', | ||
| 'vscode.objective-c', | ||
| 'vscode.perl', | ||
| 'vscode.php', | ||
| 'vscode.php-language-features', | ||
| 'vscode.powershell', | ||
| 'vscode.pug', | ||
| 'vscode.python', | ||
| 'vscode.r', | ||
| 'vscode.razor', | ||
| 'vscode.references-view', | ||
| 'vscode.restructuredtext', | ||
| 'vscode.ruby', | ||
| 'vscode.rust', | ||
| 'vscode.scss', | ||
| 'vscode.search-result', | ||
| 'vscode.shaderlab', | ||
| 'vscode.shellscript', | ||
| 'vscode.simple-browser', | ||
| 'vscode.sql', | ||
| 'vscode.swift', | ||
| 'vscode.terminal-suggest', | ||
| 'vscode.theme-abyss', | ||
| 'vscode.theme-defaults', | ||
| 'vscode.theme-kimbie-dark', | ||
| 'vscode.theme-monokai', | ||
| 'vscode.theme-monokai-dimmed', | ||
| 'vscode.theme-quietlight', | ||
| 'vscode.theme-red', | ||
| 'vscode.vscode-theme-seti', | ||
| 'vscode.theme-solarized-dark', | ||
| 'vscode.theme-solarized-light', | ||
| 'vscode.theme-tomorrow-night-blue', | ||
| 'vscode.tunnel-forwarding', | ||
| 'vscode.typescript', | ||
| 'vscode.typescript-language-features', | ||
| 'vscode.vb', | ||
| 'vscode.xml', | ||
| 'vscode.yaml', | ||
| 'GitHub.copilot', | ||
| 'GitHub.copilot-chat', | ||
| 'GitHub.vscode-pull-request-github', | ||
| 'ms-vscode-remote.remote-wsl', | ||
| 'ms-vscode.hexeditor', | ||
| 'ms-vscode.powershell', | ||
| 'ms-vscode.vscode-typescript-next', | ||
| 'ms-python.python', | ||
| 'ms-python.vscode-pylance', | ||
| 'ms-toolsai.jupyter', | ||
| 'ms-toolsai.jupyter-renderers', | ||
| 'ms-toolsai.jupyter-keymap', | ||
| 'ms-toolsai.jupyter-cell-tags', | ||
| 'ms-vscode.cpptools', | ||
| 'ms-vscode.cpptools-extension-pack', | ||
| 'ms-python.debugpy', | ||
| 'VisualStudioExptTeam.vscodeintellicode', | ||
| 'VisualStudioExptTeam.vscodeintellicode-api', | ||
| 'VisualStudioExptTeam.vscodeintellicode-azureapi', | ||
| 'VisualStudioExptTeam.vscodeintellicode-azureapi-preview', | ||
| 'redhat.java', | ||
| 'redhat.vscode-yaml', | ||
| 'ms-azuretools.vscode-docker', | ||
| 'ms-azuretools.vscode-azureresourcegroups', | ||
| 'ms-azuretools.vscode-azureresourcegroups-explorer', | ||
| 'ms-vscode-remote.remote-wsl', | ||
| 'ms-vscode-remote.remote-containers', | ||
| 'ms-vscode-remote.remote-ssh', | ||
| 'ms-vscode-remote.remote-ssh-edit', | ||
| 'ms-vscode-remote.remote-ssh-explorer', | ||
| 'ms-vscode-remote.remote-tunnels', | ||
| 'ms-vscode-remote.remote-wsl-edit', | ||
| 'GitHub.vscode-pull-request-github', | ||
| ]); | ||
|
|
||
| constructor(protected readonly eventStream: IEventStream, protected readonly vscodeAccessor: IVSCodeExtensionContext) | ||
| { | ||
| super(eventStream, vscodeAccessor); | ||
|
|
@@ -31,7 +156,7 @@ export class JsonInstaller extends IJsonInstaller | |
| // eslint-disable-next-line @typescript-eslint/require-await | ||
| public async executeJSONRequests(): Promise<void> | ||
| { | ||
| const extensions = this.vscodeAccessor.getExtensions(); | ||
| const extensions = this.vscodeAccessor.getExtensions().filter((extension) => !this.knownCommonExtensionIdsNotUsingDotnet.has(extension.id)); | ||
| for (const extension of extensions) | ||
| { | ||
| const extensionPackage = extension?.packageJSON; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.