Skip to content

Commit

Permalink
chore: Rebase against the upstream
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
  • Loading branch information
RomanNikitenko committed Oct 16, 2023
1 parent baf3cbc commit 5ed2c5d
Show file tree
Hide file tree
Showing 460 changed files with 12,897 additions and 7,163 deletions.
1 change: 1 addition & 0 deletions code/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ vscode.db
/cli/openssl
product.overrides.json
*.snap.actual
.vscode-test
2 changes: 1 addition & 1 deletion code/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.17
18.17
82 changes: 82 additions & 0 deletions code/.vscode-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

//@ts-check

const path = require('path');
const { defineConfig } = require('@vscode/test-cli');
const os = require('os');

/**
* A list of extension folders who have opted into tests, or configuration objects.
* Edit me to add more!
*
* @type {Array<string | (Partial<import("@vscode/test-cli").TestConfiguration> & { label: string })>}
*/
const extensions = [
{
label: 'markdown-language-features',
workspaceFolder: `extensions/markdown-language-features/test-workspace`,
mocha: { timeout: 60_000 }
},
{
label: 'ipynb',
workspaceFolder: path.join(os.tmpdir(), `ipynb-${Math.floor(Math.random() * 100000)}`),
mocha: { timeout: 60_000 }
},
{
label: 'notebook-renderers',
workspaceFolder: path.join(os.tmpdir(), `nbout-${Math.floor(Math.random() * 100000)}`),
mocha: { timeout: 60_000 }
},
];


const defaultLaunchArgs = process.env.API_TESTS_EXTRA_ARGS?.split(' ') || [
'--disable-telemetry', '--skip-welcome', '--skip-release-notes', `--crash-reporter-directory=${__dirname}/.build/crashes`, `--logsPath=${__dirname}/.build/logs/integration-tests`, '--no-cached-data', '--disable-updates', '--use-inmemory-secretstorage', '--disable-extensions', '--disable-workspace-trust'
];

module.exports = defineConfig(extensions.map(extension => {
/** @type {import('@vscode/test-cli').TestConfiguration} */
const config = typeof extension === 'object'
? { files: `extensions/${extension.label}/out/**/*.test.js`, ...extension }
: { files: `extensions/${extension}/out/**/*.test.js`, label: extension };

config.mocha ??= {};
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
let suite = '';
if (process.env.VSCODE_BROWSER) {
suite = `${process.env.VSCODE_BROWSER} Browser Integration ${config.label} tests`;
} else if (process.env.REMOTE_VSCODE) {
suite = `Remote Integration ${config.label} tests`;
} else {
suite = `Integration ${config.label} tests`;
}

config.mocha.reporter = 'mocha-multi-reporters';
config.mocha.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`,
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
}
};
}

if (!config.platform || config.platform === 'desktop') {
config.launchArgs = defaultLaunchArgs;
config.useInstallation = {
fromPath: process.env.INTEGRATION_TEST_ELECTRON_PATH || `${__dirname}/scripts/code.${process.platform === 'win32' ? 'bat' : 'sh'}`,
};
config.env = {
...config.env,
VSCODE_SKIP_PRELAUNCH: '1',
};
} else {
// web configs not supported, yet
}

return config;
}));
7 changes: 4 additions & 3 deletions code/.vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"GitHub.vscode-pull-request-github",
"editorconfig.editorconfig",
"github.vscode-pull-request-github",
"ms-vscode.vscode-github-issue-notebooks",
"ms-vscode.vscode-selfhost-test-provider"
"ms-vscode.vscode-selfhost-test-provider",
"ms-vscode.extension-test-runner"
]
}
6 changes: 6 additions & 0 deletions code/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
".build": true,
".profile-oss": true,
"**/.DS_Store": true,
".vscode-test": true,
"cli/target": true,
"build/**/*.js": {
"when": "$(basename).ts"
Expand Down Expand Up @@ -143,6 +144,11 @@
"${workspaceFolder}/build/**/*.js"
]
},
"extension-test-runner.debugOptions": {
"outFiles": [
"${workspaceFolder}/extensions/*/out/**/*.js",
]
},
"githubPullRequests.assignCreated": "${user}",
"githubPullRequests.defaultMergeMethod": "squash",
"githubPullRequests.ignoredPullRequestBranches": [
Expand Down
23 changes: 6 additions & 17 deletions code/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Welcome, and thank you for your interest in contributing to VS Code!

There are many ways in which you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved.
There are several ways in which you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved.

## Asking Questions

Have a question? Rather than opening an issue, please ask away on [Stack Overflow](https://stackoverflow.com/questions/tagged/vscode) using the tag `vscode`.
Have a question? Instead of opening an issue, please ask on [Stack Overflow](https://stackoverflow.com/questions/tagged/vscode) using the tag `vscode`.

The active community will be eager to assist you. Your well-worded question will serve as a resource to others searching for help.

Expand All @@ -18,7 +18,7 @@ See the [Feedback Channels](https://github.com/microsoft/vscode/wiki/Feedback-Ch

## Reporting Issues

Have you identified a reproducible problem in VS Code? Have a feature request? We want to hear about it! Here's how you can report your issue as effectively as possible.
Have you identified a reproducible problem in VS Code? Do you have a feature request? We want to hear about it! Here's how you can report your issue as effectively as possible.

### Identify Where to Report

Expand Down Expand Up @@ -52,21 +52,13 @@ The built-in tool for reporting an issue, which you can access by using `Report
Please include the following with each issue:

* Version of VS Code

* Your operating system

* List of extensions that you have installed

* Reproducible steps (1... 2... 3...) that cause the issue

* What you expected to see, versus what you actually saw

* Images, animations, or a link to a video showing the issue occurring

* A code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally

* **Note:** Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

* Errors from the Dev Tools Console (open from the menu: Help > Toggle Developer Tools)

### Creating Pull Requests
Expand All @@ -78,31 +70,28 @@ Please include the following with each issue:
Please remember to do the following:

* [ ] Search the issue repository to ensure your report is a new issue

* [ ] Recreate the issue after disabling all extensions

* [ ] Simplify your code around the issue to better isolate the problem

Don't feel bad if the developers can't reproduce the issue right away. They will simply ask for more information!

### Follow Your Issue

Once submitted, your report will go into the [issue tracking](https://github.com/microsoft/vscode/wiki/Issue-Tracking) workflow. Be sure to understand what will happen next, so you know what to expect, and how to continue to assist throughout the process.
Once submitted, your report will go into the [issue tracking](https://github.com/microsoft/vscode/wiki/Issue-Tracking) workflow. Be sure to understand what will happen next, so you know what to expect and how to continue to assist throughout the process.

## Automated Issue Management

We use GitHub Actions to help us manage issues. These Actions and their descriptions can be [viewed here](https://github.com/microsoft/vscode-github-triage-actions). Some examples of what these Actions do are:

* Automatically closes any issue marked `info-needed` if there has been no response in the past 7 days.
* Automatically close any issue marked `info-needed` if there has been no response in the past 7 days.
* Automatically lock issues 45 days after they are closed.
* Automatically implement the VS Code [feature request pipeline](https://github.com/microsoft/vscode/wiki/Issues-Triaging#managing-feature-requests).

If you believe the bot got something wrong, please open a new issue and let us know.

## Contributing Fixes

If you are interested in writing code to fix issues,
please see [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute) in the wiki.
If you are interested in writing code to fix issues, please see [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute) in the wiki.

## Thank You

Expand Down
5 changes: 5 additions & 0 deletions code/build/azure-pipelines/cli/cli-compile-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ steps:
Write-Host "##vso[task.setvariable variable=VSCODE_CLI_APPLICATION_NAME]$env:VSCODE_CLI_APPLICATION_NAME"
Move-Item -Path $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe -Destination "$(Build.ArtifactStagingDirectory)/${env:VSCODE_CLI_APPLICATION_NAME}.exe"
displayName: Stage CLI
- task: ArchiveFiles@2
displayName: Archive CLI
inputs:
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME).exe
includeRootFolder: false
Expand All @@ -76,9 +78,11 @@ steps:
echo "##vso[task.setvariable variable=VSCODE_CLI_APPLICATION_NAME]$VSCODE_CLI_APPLICATION_NAME"
mv $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code $(Build.ArtifactStagingDirectory)/$VSCODE_CLI_APPLICATION_NAME
displayName: Stage CLI
- ${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }}:
- task: ArchiveFiles@2
displayName: Archive CLI
inputs:
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
includeRootFolder: false
Expand All @@ -91,6 +95,7 @@ steps:

- ${{ else }}:
- task: ArchiveFiles@2
displayName: Archive CLI
inputs:
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
includeRootFolder: false
Expand Down
1 change: 1 addition & 0 deletions code/build/azure-pipelines/cli/cli-darwin-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ steps:
displayName: Set asset id variable
- publish: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/$(ASSET_ID).zip
displayName: Publish signed artifact with ID $(ASSET_ID)
artifact: $(ASSET_ID)
7 changes: 5 additions & 2 deletions code/build/azure-pipelines/cli/cli-win32-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ steps:

- ${{ each target in parameters.VSCODE_CLI_ARTIFACTS }}:
- task: DownloadPipelineArtifact@2
displayName: Download artifacts
displayName: Download artifact
inputs:
artifact: ${{ target }}
path: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}

- task: ExtractFiles@1
displayName: Extract artifact
inputs:
archiveFilePatterns: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/*.zip
destinationFolder: $(Build.ArtifactStagingDirectory)/sign/${{ target }}
Expand All @@ -42,7 +43,7 @@ steps:
displayName: Find ESRP CLI
- powershell: node build\azure-pipelines\common\sign $env:EsrpCliDllPath windows $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(Build.ArtifactStagingDirectory)/sign "*.exe"
displayName: "Code sign"
displayName: Codesign executable

- ${{ each target in parameters.VSCODE_CLI_ARTIFACTS }}:
- powershell: |
Expand All @@ -51,11 +52,13 @@ steps:
displayName: Set asset id variable
- task: ArchiveFiles@2
displayName: Archive signed files
inputs:
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/sign/${{ target }}
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip

- publish: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip
displayName: Publish signed artifact with ID $(ASSET_ID)
artifact: $(ASSET_ID)
19 changes: 16 additions & 3 deletions code/build/azure-pipelines/cli/install-rust-posix.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
parameters:
- name: channel
type: string
default: 1.71.0
default: 1.73.0
- name: targets
default: []
type: object

# Todo: use 1ES pipeline once extension is installed in ADO

steps:
- task: RustInstaller@1
inputs:
rustVersion: ms-${{ parameters.channel }}
cratesIoFeedOverride: $(CARGO_REGISTRY)
additionalTargets: ${{ join(' ', parameters.targets) }}
toolchainFeed: https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/nuget/v3/index.json
default: true
addToPath: true
displayName: Install MSFT Rust
condition: and(succeeded(), ne(variables['CARGO_REGISTRY'], 'none'))

- script: |
set -e
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
env:
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
displayName: "Install Rust"
displayName: Install OSS Rust
condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))
- script: |
set -e
Expand All @@ -24,14 +36,15 @@ steps:
env:
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
displayName: "Set Rust version"
condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))
- ${{ each target in parameters.targets }}:
- script: rustup target add ${{ target }}
displayName: "Adding Rust target '${{ target }}'"
condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))

- script: |
set -e
rustc --version
cargo --version
rustup --version
displayName: "Check Rust versions"
19 changes: 16 additions & 3 deletions code/build/azure-pipelines/cli/install-rust-win32.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
parameters:
- name: channel
type: string
default: 1.71.0
default: 1.73.0
- name: targets
default: []
type: object

# Todo: use 1ES pipeline once extension is installed in ADO

steps:
- task: RustInstaller@1
inputs:
rustVersion: ms-${{ parameters.channel }}
cratesIoFeedOverride: $(CARGO_REGISTRY)
additionalTargets: ${{ join(' ', parameters.targets) }}
toolchainFeed: https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/nuget/v3/index.json
default: true
addToPath: true
displayName: Install MSFT Rust
condition: and(succeeded(), ne(variables['CARGO_REGISTRY'], 'none'))

- powershell: |
. build/azure-pipelines/win32/exec.ps1
Invoke-WebRequest -Uri "https://win.rustup.rs" -Outfile $(Build.ArtifactStagingDirectory)/rustup-init.exe
exec { $(Build.ArtifactStagingDirectory)/rustup-init.exe -y --profile minimal --default-toolchain $env:RUSTUP_TOOLCHAIN --default-host x86_64-pc-windows-msvc }
echo "##vso[task.prependpath]$env:USERPROFILE\.cargo\bin"
env:
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
displayName: "Install Rust"
displayName: Install OSS Rust
condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))
- powershell: |
. build/azure-pipelines/win32/exec.ps1
Expand All @@ -25,14 +37,15 @@ steps:
env:
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
displayName: "Set Rust version"
condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))
- ${{ each target in parameters.targets }}:
- script: rustup target add ${{ target }}
displayName: "Adding Rust target '${{ target }}'"
condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))

- powershell: |
. build/azure-pipelines/win32/exec.ps1
exec { rustc --version }
exec { cargo --version }
exec { rustup --version }
displayName: "Check Rust versions"
Loading

0 comments on commit 5ed2c5d

Please sign in to comment.