VSCodium and Open VSX Registry: Extension Compatibility for Proprietary API Checks
0 reputation · 20 Aug 2024, 04:26 UTC
0 reputation · 20 Aug 2024, 04:26 UTC
VSCodium distributes a telemetry-free version of the VS Code source, utilizing the Open VSX Registry as the primary extension gallery. This is achieved by modifying the product.json configuration to redirect gallery endpoints away from the Microsoft Marketplace.
A technical challenge arises when extensions implement internal checks for the vscode product name or specific proprietary identifiers to enforce licensing or feature availability. Since VSCodium identifies as a distinct distribution, these extensions may fail to activate or restrict functionality despite the underlying API compatibility.
Given the reliance on the Open VSX Registry for distribution, there is uncertainty regarding the standard for handling extensions that explicitly target the official Microsoft binary.
33775 reputation · 20 Aug 2024, 11:49 UTC
1. Spoofing product identity?
VSCodium’s build process modifies product.json to set its own productName and productId values. Once the binary is compiled, those values are baked in and cannot be changed at runtime or by a command‑line flag. Therefore, there is no supported way for VSCodium to impersonate the official Microsoft VS Code product for extensions that perform a hard check on vscode.env.product or vscode.env.appName.
2. Keeping extensions stable when the core jumps?
The most reliable strategy is to keep the VSCodium core version aligned with the upstream VS Code release it is based on, and to test extensions against that exact version before publishing or upgrading. If an extension contains a proprietary check, the only practical fix is to patch the extension locally (or its package.json) to remove or relax the check, rebuild it, and publish to a local Open VSX registry or the official registry if licensing permits.
vscodium --version
The output will show the VSCodium version number, which corresponds to a specific VS Code release (e.g., 1.94.0).// In the VSCodium developer console (Help → Toggle Developer Tools)
console.log(vscode.env.product);
You should see an object with productName: "VSCodium" and a unique productId.Output panel, select Extension Host, and look for any error mentioning a product check.package.json into a local folder.if (process.env.VSCODE_CLI) { /* check product name */ }
npm install
npm run compile
npx vsce package
Extension Host logs.Could you confirm which VS Code core version your current VSCodium build is based on? Knowing the exact baseline will help tailor the patching or upgrade strategy more precisely.
Use comments to ask for clarification. Post a solution as an answer.
33,775 reputation · 20 Aug 2024, 07:15 UTC
It is important to distinguish between extensions that fail due to product.json identity checks and those that fail due to proprietary API dependencies. While identity checks are a logical hurdle, many high-profile extensions (such as Pylance or Live Share) rely on internal Microsoft-only APIs that are not present in the open-source code-oss base.
Because VSCodium adheres to the Microsoft Marketplace Terms of Use, it does not natively spoof the official product identity. For extensions that are functionally compatible but restricted by identity checks, users often verify the nameShort and nameLong fields in product.json. However, if an extension requires a proprietary binary component not hosted on Open VSX, manual .vsix sideloading will generally not resolve the activation failure.