Skip to content

Commit

Permalink
Rebase against the upstream, vscode-upstream-sha1: a3b299b
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 12, 2023
1 parent a2bf97a commit f84bd0d
Show file tree
Hide file tree
Showing 306 changed files with 8,532 additions and 5,523 deletions.
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
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"
2 changes: 2 additions & 0 deletions code/build/azure-pipelines/product-build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ variables:
value: true
- name: NPM_REGISTRY
value: "none"
- name: CARGO_REGISTRY
value: "none"
- name: VSCODE_CIBUILD
value: ${{ in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI') }}
- name: VSCODE_QUALITY
Expand Down
6 changes: 6 additions & 0 deletions code/build/azure-pipelines/product-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ parameters:
displayName: "Custom NPM Registry"
type: string
default: 'https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/npm/registry/'
- name: CARGO_REGISTRY
displayName: "Custom Cargo Registry"
type: string
default: 'sparse+https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/Cargo/index/'
- name: VSCODE_BUILD_WIN32
displayName: "🎯 Windows x64"
type: boolean
Expand Down Expand Up @@ -98,6 +102,8 @@ variables:
value: ${{ ne(variables['Build.Repository.Uri'], 'https://github.com/microsoft/vscode.git') }}
- name: NPM_REGISTRY
value: ${{ parameters.NPM_REGISTRY }}
- name: CARGO_REGISTRY
value: ${{ parameters.CARGO_REGISTRY }}
- name: VSCODE_QUALITY
value: ${{ parameters.VSCODE_QUALITY }}
- name: VSCODE_BUILD_STAGE_WINDOWS
Expand Down
15 changes: 15 additions & 0 deletions code/build/azure-pipelines/sdl-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ stages:
inputs:
scanFolder: "$(Build.SourcesDirectory)"
outputFormat: "pre"

- task: NodeTool@0
inputs:
versionSource: fromFile
Expand Down Expand Up @@ -143,11 +144,18 @@ stages:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Download Symbols

- task: PSScriptAnalyzer@1
inputs:
Path: '$(Build.SourcesDirectory)'
Settings: required
Recurse: true

- task: BinSkim@4
inputs:
InputType: "Basic"
Function: "analyze"
TargetPattern: "guardianGlob"
AnalyzeIgnorePdbLoadError: true
AnalyzeTargetGlob: '$(agent.builddirectory)\scanbin\**.dll;$(agent.builddirectory)\scanbin\**.exe;$(agent.builddirectory)\scanbin\**.node'
AnalyzeLocalSymbolDirectories: '$(agent.builddirectory)\scanbin\VSCode-win32-$(VSCODE_ARCH)\pdb'

Expand All @@ -162,6 +170,13 @@ stages:
SignatureFreshness: 'OneDay'
TreatStaleSignatureAs: 'Error'

- task: PublishSecurityAnalysisLogs@3
inputs:
ArtifactName: CodeAnalysisLogs
ArtifactType: Container
PublishProcessedResults: false
AllTools: true

- task: TSAUpload@2
inputs:
GdnPublishTsaOnboard: true
Expand Down
18 changes: 16 additions & 2 deletions code/build/gulpfile.scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const electron = require('@vscode/gulp-electron');
const { config } = require('./lib/electron');
const filter = require('gulp-filter');
const deps = require('./lib/dependencies');
const { existsSync, readdirSync } = require('fs');

const root = path.dirname(__dirname);

Expand Down Expand Up @@ -46,8 +47,9 @@ BUILD_TARGETS.forEach(buildTarget => {
if (platform === 'win32') {
tasks.push(
() => electron.dest(destinationPdb, { ...config, platform, arch: arch === 'armhf' ? 'arm' : arch, pdbs: true }),
util.rimraf(path.join(destinationExe, 'swiftshader')),
util.rimraf(path.join(destinationExe, 'd3dcompiler_47.dll')));
util.rimraf(path.join(destinationExe, 'd3dcompiler_47.dll')),
() => confirmPdbsExist(destinationExe, destinationPdb)
);
}

if (platform === 'linux') {
Expand Down Expand Up @@ -106,3 +108,15 @@ function nodeModules(destinationExe, destinationPdb, platform) {

return exe;
}

function confirmPdbsExist(destinationExe, destinationPdb) {
readdirSync(destinationExe).forEach(file => {
if (file.endsWith('.dll') || file.endsWith('.exe')) {
const pdb = `${file}.pdb`;
if (!existsSync(path.join(destinationPdb, pdb))) {
throw new Error(`Missing pdb file for ${file}. Tried searching for ${pdb} in ${destinationPdb}.`);
}
}
});
return Promise.resolve();
}
Loading

0 comments on commit f84bd0d

Please sign in to comment.