Repository navigation
IDE extensions: workspace trust (#263) and measured compatibility (#264) - #296
Merged
Merged
Conversation
#263) - runState.ts: the pure rules of whether an extension runs (enabled in extensions.json, --disable-extensions, Restricted Mode with untrustedWorkspaces.supported true or "limited"), used by the service - Tests: the rules, the manifest flag, workspace.isTrusted and onDidGrantWorkspaceTrust in a real host - Restricted Mode summary names extensions; README trust paragraph and security baseline row; docs/ide/extensions.md
…ost (#264) - compatProbe.ts installs a .vsix through ExtensionStore, starts the extension host in Node, fires its activation events and records the outcome, the vscode API it misses and the errors it logs - scripts/extensionCompat.mjs (npm run compat): local files, folders or Open VSX downloads; Markdown table and JSON output - CI job measuring ~30 popular Open VSX extensions, never a gate - docs/ide/extensions-compatibility.md: method, results, known limits
The host process kept its working directory, the scratch folder, locked. It no longer runs there, the probe waits for it to exit, and the folder removal retries.
…ty probe found (#264) Measured on 30 popular Open VSX extensions, five failed to activate. - import 'vscode' from an ES module (esbenp.prettier-vscode) resolves to the extension's API through module.registerHooks - VSCODE_NLS_CONFIG is set, as VS Code does (yzhang.markdown-all-in-one) - enums of unimplemented areas exist, so reading them at start-up no longer throws (TestRunProfileKind: ms-python.python; QuickInputButtonLocation: eamodio.gitlens; and 14 more) - the probe ignores Node deprecation warnings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requested by Adrián · project thread
The last two stories of epic #251.
#263: extensions and workspace trust
runState.ts: one pure rule for whether an extension runs (enabled,disabled,restricted): in Restricted Mode only extensions that declarecapabilities.untrustedWorkspaces.supported(trueor"limited") run code; themes and grammars always apply;--disable-extensionsand the person's choice always win.extensionsService.tsuses it.workspace.isTrustedfollows the IDE andonDidGrantWorkspaceTrustfires once.docs/ide/extensions.mdupdated.#264: compatibility, measured
compatProbe.ts+scripts/extensionCompat.mjs(npm run compat): installs each.vsixthroughExtensionStore, starts the real extension host in Node, fires its activation events, and reports activation, missingvscodeAPI, errors and registered commands. Takes files, folders or Open VSX ids (same client and SHA-256 check as the IDE).continue-on-error: a measurement, never a gate.docs/ide/extensions-compatibility.md: method, local results (13 packages incl. Code-XR: all with code activate, no missing API), known limits (language packs have no effect, icon themes not applied, unimplemented API areas).Testing
npm testinapps/ide: typecheck, lint (0 warnings), unit tests incl. the newextensionCompat.test.tsandextensionTrust.test.ts.npm run compatover the 13 local packages: all as in the doc.Closes #263, closes #264 (closed by hand after merge,
ideis not the default branch).