Skip to content

Commit

Permalink
Merge 1.82.0 from upstream (posit-dev#1338)
Browse files Browse the repository at this point in the history
* Merge remote-tracking branch 'origin/main' into merge/1.82.0

* Merge remote-tracking branch 'origin/main' into merge/1.82.0

* skip extension alignment for test purposes

* update product.json API proposal enablements for 1.82

* use ubuntu compatible gssapi dev package name

* add new gssapi dependency

* update to node 18 on CI

* Merge remote-tracking branch 'origin/feature/consume-ark-binaries' into merge/1.82.0

* use node version for universal app too

* restore nls.metadata.json workaround

* merge codicons

* set up nvm before using it

* load correct node version before running yarn

* update strategy for aligning x64/arm64 content

* adapt to property => accessor format for snap()

* remove failing ws-alignment tests

* Merge remote-tracking branch 'origin/feature/consume-ark-binaries' into merge/1.82.0

* Merge tag '1.82.0' into merge/1.82.0

Lead-authored-by: Jonathan McPherson <[email protected]>
Co-authored-by: positron-bot[bot] <173392469+positron-bot[bot]@users.noreply.github.com>
Signed-off-by: Jonathan McPherson <[email protected]>
  • Loading branch information
jmcphers and positron-bot[bot] committed Sep 22, 2023
1 parent 35a88da commit d3880a3
Show file tree
Hide file tree
Showing 2,036 changed files with 105,317 additions and 39,117 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:16-bullseye
FROM mcr.microsoft.com/devcontainers/typescript-node:18-bookworm

ADD install-vscode.sh /root/
RUN /root/install-vscode.sh
Expand Down
5 changes: 3 additions & 2 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ This dev container includes configuration for a development container for workin
> **Note:** The Dev Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details.
4. Due to the size of the repository we strongly recommend cloning it on a Linux filesystem for better bind mount performance. On macOS we recommend using a Docker volume (press <kbd>F1</kbd> and select **Dev Containers: Clone Repository in Container Volume...**) and on Windows we recommend using a WSL folder:

- Make sure you are running a recent WSL version to get X11 and Wayland support.
- Use the WSL extension for VS Code to open the cloned folder in WSL.
- Press <kbd>F1</kbd> and select **Dev Containers: Reopen in Container**.

Next: **[Try it out!](#try-it)**

## Try it!
## Try it

To start working with Code - OSS, follow these steps:

Expand All @@ -50,6 +51,6 @@ Next, let's try debugging.
Enjoy!
# Notes
## Notes
The container comes with VS Code Insiders installed. To run it from an Integrated Terminal use `VSCODE_IPC_HOOK_CLI= /usr/bin/code-insiders .`.
2 changes: 1 addition & 1 deletion .devcontainer/install-vscode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.mi
rm -f packages.microsoft.gpg

apt update
apt install -y code-insiders libsecret-1-dev libxkbfile-dev
apt install -y code-insiders libsecret-1-dev libxkbfile-dev libkrb5-dev
45 changes: 24 additions & 21 deletions .devcontainer/prebuilt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ If you already have VS Code and Docker installed, you can click the badge above

2. **Important**: Docker needs at least **4 Cores and 8 GB of RAM** to run a full build with **9 GB of RAM** being recommended. If you are on macOS, or are using the old Hyper-V engine for Windows, update these values for Docker Desktop by right-clicking on the Docker status bar item and going to **Preferences/Settings > Resources > Advanced**.

> **Note:** The [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extension is included in the container so you can keep an eye on CPU/Memory in the status bar.
> **Note:** The [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extension is included in the container so you can keep an eye on CPU/Memory in the status bar.
3. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Dev Containers](https://aka.ms/vscode-remote/download/containers) extension.

![Image of Dev Containers extension](https://microsoft.github.io/vscode-remote-release/images/dev-containers-extn.png)
![Image of Dev Containers extension](https://microsoft.github.io/vscode-remote-release/images/dev-containers-extn.png)

> **Note:** The Dev Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details.
> **Note:** The Dev Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details.
4. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> and select **Dev Containers: Clone Repository in Container Volume...**.

> **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend the "clone repository in container" approach instead since it uses "named volume" rather than the local filesystem.
> **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend the "clone repository in container" approach instead since it uses "named volume" rather than the local filesystem.
5. Type `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box and press <kbd>Enter</kbd>.

6. After the container is running, open a web browser and go to [http://localhost:6080](http://localhost:6080), or use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password.
6. After the container is running, open a web browser and go to [http://localhost:6080](http://localhost:6080), or use a [VNC Viewer][def] to connect to `localhost:5901` and enter `vscode` as the password.

Anything you start in VS Code, or the integrated terminal, will appear here.

Expand All @@ -54,41 +54,42 @@ Next: **[Try it out!](#try-it)**

### Using VS Code with GitHub Codespaces

You may see improved VNC responsiveness when accessing a codespace from VS Code client since you can use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/). Here's how to do it.
You may see improved VNC responsiveness when accessing a codespace from VS Code client since you can use a [VNC Viewer][def]. Here's how to do it.

1. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the the [GitHub Codespaces extension](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces).
1. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the the [GitHub Codespaces extension](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces).

> **Note:** The GitHub Codespaces extension requires the Visual Studio Code distribution of Code - OSS.
> **Note:** The GitHub Codespaces extension requires the Visual Studio Code distribution of Code - OSS.
2. After the VS Code is up and running, press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd>, choose **Codespaces: Create New Codespace**, and use the following settings:
- `microsoft/vscode` for the repository.
- Select any branch (e.g. **main**) - you can select a different one later.
- Choose **Standard** (4-core, 8GB) as the size.

4. After you have connected to the codespace, you can use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password.
- `microsoft/vscode` for the repository.
- Select any branch (e.g. **main**) - you can select a different one later.
- Choose **Standard** (4-core, 8GB) as the size.

3. After you have connected to the codespace, you can use a [VNC Viewer][def] to connect to `localhost:5901` and enter `vscode` as the password.

> **Tip:** You may also need change your VNC client's **Picture Quality** setting to **High** to get a full color desktop.
5. Anything you start in VS Code, or the integrated terminal, will appear here.
4. Anything you start in VS Code, or the integrated terminal, will appear here.

Next: **[Try it out!](#try-it)**

## Try it!
## Try it

This container uses the [Fluxbox](http://fluxbox.org/) window manager to keep things lean. **Right-click on the desktop** to see menu options. It works with GNOME and GTK applications, so other tools can be installed if needed.

> **Note:** You can also set the resolution from the command line by typing `set-resolution`.
> **Note:** You can also set the resolution from the command line by typing `set-resolution`.
To start working with Code - OSS, follow these steps:

1. In your local VS Code client, open a terminal (<kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>\`</kbd>) and type the following commands:

```bash
yarn install
bash scripts/code.sh
```
```bash
yarn install
bash scripts/code.sh
```

2. After the build is complete, open a web browser or a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to the desktop environment as described in the quick start and enter `vscode` as the password.
2. After the build is complete, open a web browser or a [VNC Viewer][def] to connect to the desktop environment as described in the quick start and enter `vscode` as the password.

3. You should now see Code - OSS!

Expand All @@ -98,8 +99,10 @@ Next, let's try debugging.

2. Go to your local VS Code client, and use the **Run / Debug** view to launch the **VS Code** configuration. (Typically the default, so you can likely just press <kbd>F5</kbd>).

> **Note:** If launching times out, you can increase the value of `timeout` in the "VS Code", "Attach Main Process", "Attach Extension Host", and "Attach to Shared Process" configurations in [launch.json](../../.vscode/launch.json). However, running `scripts/code.sh` first will set up Electron which will usually solve timeout issues.
> **Note:** If launching times out, you can increase the value of `timeout` in the "VS Code", "Attach Main Process", "Attach Extension Host", and "Attach to Shared Process" configurations in [launch.json](../../.vscode/launch.json). However, running `scripts/code.sh` first will set up Electron which will usually solve timeout issues.
3. After a bit, Code - OSS will appear with the debugger attached!

Enjoy!

[def]: https://www.realvnc.com/en/connect/download/viewer/
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
**/extensions/typescript-language-features/test-workspace/**
**/extensions/typescript-language-features/extension.webpack.config.js
**/extensions/typescript-language-features/extension-browser.webpack.config.js
**/extensions/typescript-language-features/package-manager/node-maintainer/**
**/extensions/vscode-api-tests/testWorkspace/**
**/extensions/vscode-api-tests/testWorkspace2/**
**/fixtures/**
Expand Down
60 changes: 60 additions & 0 deletions .eslintplugin/code-amd-node-module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as eslint from 'eslint';
import { join } from 'path';


export = new class ApiProviderNaming implements eslint.Rule.RuleModule {

readonly meta: eslint.Rule.RuleMetaData = {
messages: {
amdX: 'Use `import type` for import declarations, use `amdX#importAMDNodeModule` for import expressions'
}
};

create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {

const modules = new Set<string>();

try {
const { dependencies, optionalDependencies } = require(join(__dirname, '../package.json'));
const all = Object.keys(dependencies).concat(Object.keys(optionalDependencies));
for (const key of all) {
modules.add(key);
}

} catch (e) {
console.error(e);
throw e;
}


const checkImport = (node: any) => {

if (node.type !== 'Literal' || typeof node.value !== 'string') {
return;
}

if (node.parent.importKind === 'type') {
return;
}

if (!modules.has(node.value)) {
return;
}

context.report({
node,
messageId: 'amdX'
});
}

return {
['ImportExpression Literal']: checkImport,
['ImportDeclaration Literal']: checkImport
};
}
};
3 changes: 2 additions & 1 deletion .eslintplugin/code-import-patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ export = new class implements eslint.Rule.RuleModule {
const restrictions = (typeof option.restrictions === 'string' ? [option.restrictions] : option.restrictions).slice(0);

if (targetIsVS) {
// Always add "vs/nls"
// Always add "vs/nls" and "vs/amdX"
restrictions.push('vs/nls');
restrictions.push('vs/amdX'); // TODO@jrieken remove after ESM is real
}

if (targetIsVS && option.layer) {
Expand Down
33 changes: 33 additions & 0 deletions .eslintplugin/code-no-native-private.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as eslint from 'eslint';

export = new class ApiProviderNaming implements eslint.Rule.RuleModule {

readonly meta: eslint.Rule.RuleMetaData = {
messages: {
slow: 'Native private fields are much slower and should only be used when needed. Ignore this warning if you know what you are doing, use compile-time private otherwise. See https://github.com/microsoft/vscode/issues/185991#issuecomment-1614468158 for details',
}
};

create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {

return {
['PropertyDefinition PrivateIdentifier']: (node: any) => {
context.report({
node,
messageId: 'slow'
});
},
['MethodDefinition PrivateIdentifier']: (node: any) => {
context.report({
node,
messageId: 'slow'
});
}
};
}
};
33 changes: 33 additions & 0 deletions .eslintplugin/code-no-test-async-suite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { TSESTree } from '@typescript-eslint/experimental-utils';
import * as eslint from 'eslint';

function isCallExpression(node: TSESTree.Node): node is TSESTree.CallExpression {
return node.type === 'CallExpression';
}

function isFunctionExpression(node: TSESTree.Node): node is TSESTree.FunctionExpression {
return node.type.includes('FunctionExpression');
}

export = new class NoAsyncSuite implements eslint.Rule.RuleModule {

create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
function hasAsyncSuite(node: any) {
if (isCallExpression(node) && node.arguments.length >= 2 && isFunctionExpression(node.arguments[1]) && node.arguments[1].async) {
return context.report({
node: node as any,
message: 'suite factory function should never be async'
});
}
}

return {
['CallExpression[callee.name=/suite$/][arguments]']: hasAsyncSuite,
};
}
};
20 changes: 20 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
}
],
"local/code-translation-remind": "warn",
"local/code-no-native-private": "warn",
"local/code-no-nls-in-standalone-editor": "warn",
"local/code-no-standalone-editor": "warn",
"local/code-no-unexternalized-strings": "warn",
Expand Down Expand Up @@ -118,6 +119,7 @@
],
"rules": {
"local/code-no-test-only": "error",
"local/code-no-test-async-suite": "warn",
"local/code-no-unexternalized-strings": "off"
}
},
Expand Down Expand Up @@ -172,6 +174,7 @@
"drop",
"edit",
"end",
"execute",
"expand",
"grant",
"hide",
Expand All @@ -195,6 +198,14 @@
]
}
},
{
"files": [
"src/**/{common,browser}/**/*.ts"
],
"rules": {
"local/code-amd-node-module": "warn"
}
},
{
"files": [
// --- Start Positron ---
Expand Down Expand Up @@ -235,9 +246,11 @@
"console",
"cookie",
"crypto",
"dns",
"electron",
"events",
"fs",
"fs/promises",
"graceful-fs",
"http",
"https",
Expand All @@ -249,6 +262,7 @@
"os",
"path",
"perf_hooks",
"readline",
"stream",
"string_decoder",
"tas-client-umd",
Expand Down Expand Up @@ -629,6 +643,12 @@
"vs/workbench/workbench.common.main"
]
},
{
"target": "src/vs/amdX.ts",
"restrictions": [
"vs/base/common/*"
]
},
{
"target": "src/vs/workbench/{workbench.desktop.main.nls.js,workbench.web.main.nls.js}",
"restrictions": []
Expand Down
1 change: 0 additions & 1 deletion .github/classifier.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@
"workbench-editor-resolver": {"assign": ["lramos15"]},
"workbench-editors": {"assign": ["bpasero"]},
"workbench-electron": {"assign": ["deepak1556"]},
"workbench-feedback": {"assign": ["bpasero"]},
"workbench-fonts": {"assign": []},
"workbench-history": {"assign": ["bpasero"]},
"workbench-hot-exit": {"assign": ["bpasero"]},
Expand Down
4 changes: 2 additions & 2 deletions .github/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"action": "updateLabels",
"addLabel": "info-needed",
"removeLabel": "~confirmation-needed",
"comment": "Thanks for creating this issue! To help narrow it down, please take the time to follow below steps. Thanks a lot and happy coding 🙏\n\n### Is the issue caused by an Extension?\nStop VS Code and from the command line (NOT the integrated terminal in Code), execute: `code --disable-extensions` and try your steps again to see if it reproduces. If it still reproduces, jump to the next chapter.\n\nIf you see it is an issue with the extension, please run the command `Start Extension Bisect` and follow the instructions to find the extension that is causing this issue.\n\n<img width='631' alt='image' src='https://user-images.githubusercontent.com/900690/228760008-d5790ad1-74da-46a2-917f-e1bd26281ca8.png'>\n\nPlease report the issue to the extension causing this.\n\n### Is the issue caused by VS Code Core?\nIf the issue is not caused by an extension, it is maybe caused by your configuration. Try to run `code --disable-extensions --user-data-dir <directory>` where `<directory>` is an empty folder. This will ensure Code is starting with a fresh data directory, e.g. no specific settings and without any extensions running.\n\nIf it still reproduces, it was maybe fixed already in our nightly release. Please download from https://code.visualstudio.com/insiders/ and see if you can reproduce the issue.\n\nFinally, to help us narrow down what change caused the issue, please run the following command to find the build. It will start previous releases of VS Code insiders to see where the regression was introduced:\n* `npx --yes vscode-bisect@latest`\n* follow the instructions until you found the offending build\n* report back the commit range in this issue\n\nThanks!"
"comment": "Please diagnose the root cause of the issue by running the command `F1 > Help: Troubleshoot Issue` and following the instructions. Once you have done that, please update the issue with the results.\n\nHappy Coding!"
},
{
"type": "comment",
Expand Down Expand Up @@ -486,7 +486,7 @@
],
"action": "comment",
"addLabel": "info-needed",
"comment": "Thanks for creating this issue! To help narrow it down, please take the time to follow below steps. Thanks a lot and happy coding 🙏\n\n### Is the issue caused by an Extension?\nStop VS Code and from the command line (NOT the integrated terminal in Code), execute: `code --disable-extensions` and try your steps again to see if it reproduces. If it still reproduces, jump to the next chapter.\n\nIf you see it is an issue with the extension, please run the command `Start Extension Bisect` and follow the instructions to find the extension that is causing this issue.\n\n<img width='631' alt='image' src='https://user-images.githubusercontent.com/900690/228760008-d5790ad1-74da-46a2-917f-e1bd26281ca8.png'>\n\nPlease report the issue to the extension causing this.\n\n### Is the issue caused by VS Code Core?\nIf the issue is not caused by an extension, it is maybe caused by your configuration. Try to run `code --disable-extensions --user-data-dir <directory>` where `<directory>` is an empty folder. This will ensure Code is starting with a fresh data directory, e.g. no specific settings and without any extensions running.\n\nIf it still reproduces, it was maybe fixed already in our nightly release. Please download from https://code.visualstudio.com/insiders/ and see if you can reproduce the issue.\n\nFinally, to help us narrow down what change caused the issue, please run the following command to find the build. It will start previous releases of VS Code insiders to see where the regression was introduced:\n* `npx --yes vscode-bisect@latest`\n* follow the instructions until you found the offending build\n* report back the commit range in this issue\n\nThanks!"
"comment": "Please diagnose the root cause of the issue by running the command `F1 > Help: Troubleshoot Issue` and following the instructions. Once you have done that, please update the issue with the results.\n\nHappy Coding!"
},
{
"__comment__": "Allows folks on the team to label issues by commenting: `\\label My-Label` ",
Expand Down
Loading

0 comments on commit d3880a3

Please sign in to comment.