You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have an issue which has a "needs PR" label (feel free to indicate you would like to provide a PR for the issue so others don't work on it as well)
Guidelines
General
Python or TypeScript?
Always prefer to write Python code over TypeScript code. Not only does that give us more opportunity to use the extension ourself but it makes it easier for our users to contribute back.
Comments
Add comments to explain non-obvious decisions, or contextual knowledge that can be forgotten.
Conciseness is important.
Comment should start with an uppercase letter, and end with a period (i.e. be complete sentences).
If a question can be answered by looking at the code, a comment is probably unnecessary.
A comment should answer "Why was this done this way?" two years down the line. If it doesn't, it is probably unnecessary, or should be rewritten.
If some logic depends on external factors or tools, a comment capturing the assumptions made at implementation time may be useful.
If the comment refers to work that needs to be done, create an issue for it and link it in your comment.
If you see warnings that The engine "vscode" appears to be invalid., you can ignore these. If python3 is not available for some reason, you can use python instead.
Incremental Build
Run the Compile build task from the Run Build Task... command picker (short cut CTRL+SHIFT+B or ⇧⌘B). This will leave build task running in the background and which will re-run as files are edited and saved. You can see the output from either task in the Terminal panel (use the selector to choose which output to look at).
You can also compile from the command-line. For a full compile you can use:
npx gulp prePublishNonBundle
For incremental builds you can use the following commands depending on your needs:
npm run compile
Sometimes you will need to run npm run clean and even rm -r out.
This is especially true if you have added or removed files.
Web version of extension
To build the web version of the extension, run the following command.
npx gulp webpack
Sometimes you will need to run npm run clean and even rm -r out.
This is especially true if you have added or removed files.
Using a Proposed API
Follow these steps to incorporate a proposed API into your extension:
Enable the Proposed API in Your Extension: Refer to the official guide for enabling proposed APIs in a VS Code extension: Using Proposed API.
Add Your Extension's Dependency to the Proposed API: Update the vscode-distro repository to include your extension's dependency on the proposed API. Use this example PR as a reference: Example PR in vscode-distro.
Wait for the vscode-distro PR to Be Merged: Once the vscode-distro PR is merged, note the new hash generated from the merged changes.
Update VS Code to Pull the Latest Distro Changes: Update the distro field in the package.json file in the vscode repository to use the new hash. Use this example PR as a reference: Example PR in vscode.