Microsoft/vscode
View on GitHub`code serve-web` ignores the `--enable-proposed-api` flag
Open
#228,781 opened on Sep 16, 2024
feature-requesthelp wantedremote
Repository metrics
- Stars
- (74,848 stars)
- PR merge metrics
- (Avg merge 11h 43m) (1,000 merged PRs in 30d)
Description
Does this issue occur when all extensions are disabled?: N/A, this requires an extension with proposed APIs enable to occur.
- VS Code Version:
code 1.93.1 (commit 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40) - OS Version: Debian 11
Steps to Reproduce:
- Create an extension that declares
enabledApiProposalsin its package.json file, e.g.:
<...>
"name": "myextension",
"publisher": "publisher",
"enabledApiProposals": [
"chatParticipantPrivate"
],
<...>
- Launch
serve-webwith the--enable-proposed-apioption enabling proposed APIs for your extension:
code --enable-proposed-api="publisher.myextension" \
serve-web \
--port "11001" \
--host "0.0.0.0" \
--without-connection-token \
--accept-server-license-terms
- Observe developer tools console:
- Expected: The extension is allowed to call into the proposed API.
- Actual:
mainThreadExtensionService.ts:107 Activating extension 'publisher.myextension' failed: Extension 'publisher.myextension' CANNOT use API proposal: chatParticipantPrivate.
Its package.json#enabledApiProposals-property declares: but NOT chatParticipantPrivate.
The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api publisher.myextension.
The flag does work if code is launched locally and serve-web is not invoked. However the web IDE enabled by serve-web ignores the flag.