Skip to content

Commit

Permalink
Merge branch 'main' into whispering-gorilla
Browse files Browse the repository at this point in the history
  • Loading branch information
aiday-mar committed May 23, 2024
2 parents 9c71082 + ba6fb3b commit 052aa39
Show file tree
Hide file tree
Showing 311 changed files with 10,506 additions and 5,584 deletions.
15 changes: 13 additions & 2 deletions .vscode/extensions/vscode-selfhost-test-provider/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const TEST_FILE_PATTERN = 'src/vs/**/*.{test,integrationTest}.ts';

const getWorkspaceFolderForTestFile = (uri: vscode.Uri) =>
(uri.path.endsWith('.test.ts') || uri.path.endsWith('.integrationTest.ts')) &&
uri.path.includes('/src/vs/')
uri.path.includes('/src/vs/')
? vscode.workspace.getWorkspaceFolder(uri)
: undefined;

Expand All @@ -41,6 +41,17 @@ export async function activate(context: vscode.ExtensionContext) {
const ctrl = vscode.tests.createTestController('selfhost-test-controller', 'VS Code Tests');
const fileChangedEmitter = new vscode.EventEmitter<FileChangeEvent>();

context.subscriptions.push(vscode.tests.registerTestFollowupProvider({
async provideFollowup(_result, test, taskIndex, messageIndex, _token) {
return [{
title: '$(sparkle) Ask copilot for help',
command: 'github.copilot.tests.fixTestFailure',
arguments: [{ source: 'peekFollowup', test, message: test.taskStates[taskIndex].messages[messageIndex] }]
}];
},
}));


ctrl.resolveHandler = async test => {
if (!test) {
context.subscriptions.push(await startWatchingWorkspace(ctrl, fileChangedEmitter));
Expand All @@ -62,7 +73,7 @@ export async function activate(context: vscode.ExtensionContext) {
});

const createRunHandler = (
runnerCtor: { new (folder: vscode.WorkspaceFolder): VSCodeTestRunner },
runnerCtor: { new(folder: vscode.WorkspaceFolder): VSCodeTestRunner },
kind: vscode.TestRunProfileKind,
args: string[] = []
) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ export class FailingDeepStrictEqualAssertFixer {
},
})
);

tests.testResults;
}

dispose() {
Expand All @@ -99,15 +97,15 @@ const formatJsonValue = (value: unknown) => {
context => (node: ts.Node) => {
const visitor = (node: ts.Node): ts.Node =>
ts.isPropertyAssignment(node) &&
ts.isStringLiteralLike(node.name) &&
identifierLikeRe.test(node.name.text)
ts.isStringLiteralLike(node.name) &&
identifierLikeRe.test(node.name.text)
? ts.factory.createPropertyAssignment(
ts.factory.createIdentifier(node.name.text),
ts.visitNode(node.initializer, visitor) as ts.Expression
)
ts.factory.createIdentifier(node.name.text),
ts.visitNode(node.initializer, visitor) as ts.Expression
)
: ts.isStringLiteralLike(node) && node.text === '[undefined]'
? ts.factory.createIdentifier('undefined')
: ts.visitEachChild(node, visitor, context);
? ts.factory.createIdentifier('undefined')
: ts.visitEachChild(node, visitor, context);

return ts.visitNode(node, visitor);
},
Expand Down Expand Up @@ -190,7 +188,7 @@ class StrictEqualAssertion {
return undefined;
}

constructor(private readonly expression: ts.CallExpression) {}
constructor(private readonly expression: ts.CallExpression) { }

/** Gets the expected value */
public get expectedValue(): ts.Expression | undefined {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export async function scanTestOutput(
return;
}

const logLocation = store.getSourceLocation(match[2], Number(match[3]));
const logLocation = store.getSourceLocation(match[2], Number(match[3]) - 1);
const logContents = replaceAllLocations(store, match[1]);
const test = currentTest;

Expand Down Expand Up @@ -459,7 +459,8 @@ export class SourceMapStore {
};
}

async getSourceLocation(fileUri: string, line: number, col = 1) {
/** Gets an original location from a base 0 line and column */
async getSourceLocation(fileUri: string, line: number, col = 0) {
return this.getSourceLocationMapper(fileUri).then(m => m(line, col));
}

Expand Down Expand Up @@ -599,5 +600,5 @@ async function tryDeriveStackLocation(

async function deriveSourceLocation(store: SourceMapStore, parts: RegExpMatchArray) {
const [, fileUri, line, col] = parts;
return store.getSourceLocation(fileUri, Number(line), Number(col));
return store.getSourceLocation(fileUri, Number(line) - 1, Number(col));
}
4 changes: 2 additions & 2 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
disturl "https://electronjs.org/headers"
target "29.3.1"
ms_build_id "9464424"
target "29.4.0"
ms_build_id "9593362"
runtime "electron"
build_from_source "true"
2 changes: 1 addition & 1 deletion build/.cachesalt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-03-18T08:47:22.277Z
2024-05-16T14:24:05.381Z
9 changes: 9 additions & 0 deletions build/.moduleignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ fsevents/test/**
@vscode/spdlog/*.yml
!@vscode/spdlog/build/Release/*.node

@vscode/deviceid/binding.gyp
@vscode/deviceid/build/**
@vscode/deviceid/deps/**
@vscode/deviceid/src/**
@vscode/deviceid/test/**
@vscode/deviceid/*.yml
!@vscode/deviceid/build/Release/*.node


@vscode/sqlite3/binding.gyp
@vscode/sqlite3/benchmark/**
@vscode/sqlite3/cloudformation/**
Expand Down
32 changes: 6 additions & 26 deletions build/azure-pipelines/linux/product-build-linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ steps:
- script: ./scripts/test-integration.sh --tfs "Integration Tests"
env:
DISPLAY: ":10"
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Electron)
timeoutInMinutes: 20

Expand All @@ -104,8 +101,7 @@ steps:

- script: ./scripts/test-remote-integration.sh
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
# TODO(deepak1556): Remove this once we update to Node.js >= 20.11.x
UV_USE_IO_URING: 0
displayName: Run integration tests (Remote)
timeoutInMinutes: 20
Expand All @@ -123,9 +119,6 @@ steps:
./scripts/test-integration.sh --build --tfs "Integration Tests"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Electron)
timeoutInMinutes: 20
Expand All @@ -144,8 +137,7 @@ steps:
./scripts/test-remote-integration.sh
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
# TODO(deepak1556): Remove this once we update to Node.js >= 20.11.x
UV_USE_IO_URING: 0
displayName: Run integration tests (Remote)
timeoutInMinutes: 20
Expand Down Expand Up @@ -173,42 +165,31 @@ steps:

- script: yarn smoketest-no-compile --tracing
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Electron)

- script: yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
# TODO(deepak1556): Remove this once we update to Node.js >= 20.11.x
UV_USE_IO_URING: 0
displayName: Run smoke tests (Browser, Chromium)

- script: yarn smoketest-no-compile --remote --tracing
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
# TODO(deepak1556): Remove this once we update to Node.js >= 20.11.x
UV_USE_IO_URING: 0
displayName: Run smoke tests (Remote)

- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: yarn smoketest-no-compile --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Electron)

- script: yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
# TODO(deepak1556): Remove this once we update to Node.js >= 20.11.x
UV_USE_IO_URING: 0
timeoutInMinutes: 20
displayName: Run smoke tests (Browser, Chromium)
Expand All @@ -221,8 +202,7 @@ steps:
yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
# TODO(deepak1556): Remove this once we update to Node.js >= 20.11.x
UV_USE_IO_URING: 0
displayName: Run smoke tests (Remote)
Expand Down
93 changes: 40 additions & 53 deletions build/azure-pipelines/linux/product-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,50 +100,48 @@ steps:
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication

- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
# To workaround the issue of yarn not respecting the registry value from .npmrc
yarn config set registry "$NPM_REGISTRY"
for i in {1..5}; do # try 5 times
yarn --cwd build --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
source ./build/azure-pipelines/linux/setup-env.sh
for i in {1..5}; do # try 5 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
env:
npm_config_arch: $(NPM_ARCH)
VSCODE_ARCH: $(VSCODE_ARCH)
NPM_REGISTRY: "$(NPM_REGISTRY)"
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Install dependencies (non-OSS)
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- script: |
set -e
- script: |
set -e
for i in {1..5}; do # try 5 times
yarn --cwd build --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
source ./build/azure-pipelines/linux/setup-env.sh
for i in {1..5}; do # try 5 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
env:
npm_config_arch: $(NPM_ARCH)
VSCODE_ARCH: $(VSCODE_ARCH)
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
EXPECTED_GLIBC_VERSION="2.28" \
EXPECTED_GLIBCXX_VERSION="3.4.25" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Check GLIBC and GLIBCXX dependencies in remote/node_modules
- script: |
set -e
EXPECTED_GLIBC_VERSION="2.28" \
EXPECTED_GLIBCXX_VERSION="3.4.25" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Check GLIBC and GLIBCXX dependencies in remote/node_modules
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: node build/azure-pipelines/distro/mixin-npm
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Mixin distro node modules
Expand All @@ -154,23 +152,12 @@ steps:
- script: |
set -e
for i in {1..5}; do # try 5 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
cd node_modules/native-keymap && npx node-gyp@9.4.0 -y rebuild --debug
cd ../.. && ./.github/workflows/check-clean-git-state.sh
env:
npm_config_arch: $(NPM_ARCH)
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Install dependencies (OSS)
displayName: Rebuild debug version of native modules (OSS)
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- script: |
Expand Down
Loading

0 comments on commit 052aa39

Please sign in to comment.