Skip to content

Commit

Permalink
👻 Enable use of a proposed api in dev mode (#222)
Browse files Browse the repository at this point in the history
In development mode, to avoid errors being displayed about proposed API use:
  - Add the proposed API to the extension's `package.json` so it can be
    activated from the vscode cli
  - Add the cli switch to the dev launcher.json config

Note: According to [1], an extension using a proposed api cannot be
published. More exploration is needed to see how we can support using
the proposed api via `.vsix` install but also create a package that can
be published to the extension store.

[1] - https://code.visualstudio.com/api/advanced-topics/using-proposed-api

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 authored Feb 10, 2025
1 parent ae23485 commit ef15d67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}/vscode"],
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/vscode",
"--enable-proposed-api=konveyor.konveyor-ai"
],
"outFiles": ["${workspaceFolder}/vscode/out/**/*.js"],
"env": {
"VSCODE_DEBUG_MODE": "true"
Expand Down
3 changes: 3 additions & 0 deletions vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
"node": ">=22.9.0",
"npm": "^9.5.0 || ^10.5.0"
},
"enabledApiProposals": [
"contribDiffEditorGutterToolBarMenus"
],
"activationEvents": [
"onFileSystem:konveyorMemFs",
"onFileSystem:konveyorReadOnly"
Expand Down

0 comments on commit ef15d67

Please sign in to comment.