Skip to content

Commit f8506ce

Browse files
authored
Merge branch 'main' into tyriar/measure_latency
2 parents 3bd17a5 + e092705 commit f8506ce

File tree

408 files changed

+8404
-5900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+8404
-5900
lines changed

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you already have VS Code and Docker installed, you can click the badge above
1212

1313
1. Install Docker Desktop or Docker for Linux on your local machine. (See [docs](https://aka.ms/vscode-remote/containers/getting-started) for additional details.)
1414

15-
2. **Important**: Docker needs at least **4 Cores and 8 GB of RAM** to run a full build. 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**.
15+
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**.
1616

1717
> **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.
1818

.devcontainer/devcontainer.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@
66
"overrideCommand": false,
77
"runArgs": [ "--init", "--security-opt", "seccomp=unconfined", "--shm-size=1g"],
88

9-
"settings": {
10-
"resmon.show.battery": false,
11-
"resmon.show.cpufreq": false
9+
// VS Code extensions and settings
10+
"customizations": {
11+
"vscode": {
12+
"settings": {
13+
"resmon.show.battery": false,
14+
"resmon.show.cpufreq": false
15+
},
16+
"extensions": [
17+
"dbaeumer.vscode-eslint",
18+
"mutantdino.resourcemonitor"
19+
]
20+
}
1221
},
1322

1423
// noVNC, VNC
@@ -24,17 +33,12 @@
2433
}
2534
},
2635

27-
"extensions": [
28-
"dbaeumer.vscode-eslint",
29-
"mutantdino.resourcemonitor"
30-
],
31-
3236
// Optionally loads a cached yarn install for the repo
3337
"postCreateCommand": ".devcontainer/cache/restore-diff.sh",
3438

3539
"remoteUser": "node",
3640

3741
"hostRequirements": {
38-
"memory": "8gb"
42+
"memory": "9gb"
3943
}
4044
}

.vscode/cglicenses.schema.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,31 @@
5555
}
5656
}
5757
}
58+
},
59+
{
60+
"type": "object",
61+
"required": [
62+
"name",
63+
"fullLicenseTextUri"
64+
],
65+
"properties": {
66+
"name": {
67+
"type": "string",
68+
"description": "The name of the dependency"
69+
},
70+
"fullLicenseTextUri": {
71+
"type": "string",
72+
"description": "The URI to the license text of this repository",
73+
"format": "uri"
74+
},
75+
"prependLicenseText": {
76+
"type": "array",
77+
"description": "A piece of text to prepend to the auto-detected license text of the dependency",
78+
"items": {
79+
"type": "string"
80+
}
81+
}
82+
}
5883
}
5984
]
6085
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@
9292
"editor.defaultFormatter": "rust-lang.rust-analyzer",
9393
"editor.formatOnSave": true,
9494
},
95+
"rust-analyzer.linkedProjects": [
96+
"cli/Cargo.toml"
97+
],
9598
"typescript.tsc.autoDetect": "off",
9699
"testing.autoRun.mode": "rerun",
97100
"conventionalCommits.scopes": [

build/azure-pipelines/cli/cli-compile-and-publish.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,20 @@ parameters:
88
default: {}
99

1010
steps:
11-
- script: cargo build --release --target ${{ parameters.VSCODE_CLI_TARGET }} --bin=code-tunnel
11+
- script: cargo build --release --target ${{ parameters.VSCODE_CLI_TARGET }} --bin=code
1212
displayName: Compile ${{ parameters.VSCODE_CLI_TARGET }}
1313
workingDirectory: $(Build.SourcesDirectory)/cli
1414
env:
15-
VSCODE_CLI_VERSION: $(VSCODE_CLI_VERSION)
16-
VSCODE_CLI_REMOTE_LICENSE_TEXT: $(VSCODE_CLI_REMOTE_LICENSE_TEXT)
17-
VSCODE_CLI_REMOTE_LICENSE_PROMPT: $(VSCODE_CLI_REMOTE_LICENSE_PROMPT)
18-
VSCODE_CLI_ASSET_NAME: ${{ parameters.VSCODE_CLI_ARTIFACT }}
19-
VSCODE_CLI_AI_KEY: $(VSCODE_CLI_AI_KEY)
20-
VSCODE_CLI_AI_ENDPOINT: $(VSCODE_CLI_AI_ENDPOINT)
2115
${{ each pair in parameters.VSCODE_CLI_ENV }}:
2216
${{ pair.key }}: ${{ pair.value }}
2317

2418
- ${{ if or(contains(parameters.VSCODE_CLI_TARGET, '-windows-'), contains(parameters.VSCODE_CLI_TARGET, '-darwin')) }}:
2519
- task: ArchiveFiles@2
2620
inputs:
2721
${{ if contains(parameters.VSCODE_CLI_TARGET, '-windows-') }}:
28-
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code-tunnel.exe
22+
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe
2923
${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }}:
30-
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code-tunnel
24+
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code
3125
includeRootFolder: false
3226
archiveType: zip
3327
archiveFile: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
@@ -39,7 +33,7 @@ steps:
3933
- ${{ else }}:
4034
- task: ArchiveFiles@2
4135
inputs:
42-
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code-tunnel
36+
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code
4337
includeRootFolder: false
4438
archiveType: tar
4539
tarCompression: gz

build/azure-pipelines/cli/cli-win32-sign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ steps:
5656
5757
- task: ArchiveFiles@2
5858
inputs:
59-
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/sign/${{ target }}/code-tunnel.exe
59+
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/sign/${{ target }}/code.exe
6060
includeRootFolder: false
6161
archiveType: zip
6262
archiveFile: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip

build/azure-pipelines/cli/install-rust-win32.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ parameters:
1111
steps:
1212
- powershell: |
1313
. build/azure-pipelines/win32/exec.ps1
14-
exec { curl -sSf -o rustup-init.exe https://win.rustup.rs }
15-
exec { rustup-init.exe -y --profile minimal --default-toolchain %RUSTUP_TOOLCHAIN% --default-host x86_64-pc-windows-msvc }
14+
Invoke-WebRequest -Uri "https://win.rustup.rs" -Outfile $(Build.ArtifactStagingDirectory)/rustup-init.exe
15+
exec { $(Build.ArtifactStagingDirectory)/rustup-init.exe -y --profile minimal --default-toolchain $env:RUSTUP_TOOLCHAIN --default-host x86_64-pc-windows-msvc }
1616
echo "##vso[task.prependpath]$env:USERPROFILE\.cargo\bin"
1717
env:
1818
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}

build/azure-pipelines/cli/prepare.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,28 @@ const fs = require("fs");
99
const path = require("path");
1010
const packageJson = require("../../../package.json");
1111
const root = path.dirname(path.dirname(path.dirname(__dirname)));
12-
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
12+
let productJsonPath;
13+
if (process.env.VSCODE_QUALITY === 'oss' || !process.env.VSCODE_QUALITY) {
14+
productJsonPath = path.join(root, 'product.json');
15+
}
16+
else {
17+
productJsonPath = path.join(root, 'quality', process.env.VSCODE_QUALITY, 'product.json');
18+
}
19+
console.log('Loading product.json from', productJsonPath);
20+
const product = JSON.parse(fs.readFileSync(productJsonPath, 'utf8'));
1321
const commit = (0, getVersion_1.getVersion)(root);
1422
/**
1523
* Sets build environment variables for the CLI for current contextual info.
1624
*/
1725
const setLauncherEnvironmentVars = () => {
1826
const vars = new Map([
19-
['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense],
27+
['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense?.join('\\n')],
2028
['VSCODE_CLI_REMOTE_LICENSE_PROMPT', product.serverLicensePrompt],
29+
['VSCODE_CLI_AI_KEY', product.aiConfig?.cliKey],
30+
['VSCODE_CLI_AI_ENDPOINT', product.aiConfig?.cliEndpoint],
2131
['VSCODE_CLI_VERSION', packageJson.version],
32+
['VSCODE_CLI_UPDATE_ENDPOINT', product.updateUrl],
33+
['VSCODE_CLI_QUALITY', product.quality],
2234
['VSCODE_CLI_COMMIT', commit],
2335
]);
2436
for (const [key, value] of vars) {

build/azure-pipelines/cli/prepare.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,30 @@ import * as path from 'path';
99
import * as packageJson from '../../../package.json';
1010

1111
const root = path.dirname(path.dirname(path.dirname(__dirname)));
12-
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
12+
13+
let productJsonPath: string;
14+
if (process.env.VSCODE_QUALITY === 'oss' || !process.env.VSCODE_QUALITY) {
15+
productJsonPath = path.join(root, 'product.json');
16+
} else {
17+
productJsonPath = path.join(root, 'quality', process.env.VSCODE_QUALITY, 'product.json');
18+
}
19+
20+
console.log('Loading product.json from', productJsonPath);
21+
const product = JSON.parse(fs.readFileSync(productJsonPath, 'utf8'));
1322
const commit = getVersion(root);
1423

1524
/**
1625
* Sets build environment variables for the CLI for current contextual info.
1726
*/
1827
const setLauncherEnvironmentVars = () => {
1928
const vars = new Map([
20-
['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense],
29+
['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense?.join('\\n')],
2130
['VSCODE_CLI_REMOTE_LICENSE_PROMPT', product.serverLicensePrompt],
31+
['VSCODE_CLI_AI_KEY', product.aiConfig?.cliKey],
32+
['VSCODE_CLI_AI_ENDPOINT', product.aiConfig?.cliEndpoint],
2233
['VSCODE_CLI_VERSION', packageJson.version],
34+
['VSCODE_CLI_UPDATE_ENDPOINT', product.updateUrl],
35+
['VSCODE_CLI_QUALITY', product.quality],
2336
['VSCODE_CLI_COMMIT', commit],
2437
]);
2538

build/azure-pipelines/darwin/cli-build-darwin.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ steps:
1616

1717
- template: ../mixin-distro-posix.yml
1818
parameters:
19-
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
19+
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
2020

2121
- script: |
2222
set -e
2323
node build/azure-pipelines/cli/prepare.js
2424
displayName: Prepare CLI build
2525
env:
2626
GITHUB_TOKEN: "$(github-distro-mixin-password)"
27+
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
2728
2829
- template: ../cli/install-rust-posix.yml
2930
parameters:

0 commit comments

Comments
 (0)