Skip to content

Commit c082384

Browse files
committed
Merge branch 'master' into sync-from-rust
2 parents 35940bc + c26a43d commit c082384

File tree

470 files changed

+45241
-16164
lines changed

Some content is hidden

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

470 files changed

+45241
-16164
lines changed

.github/actions/github-release/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ perform github releases but they all tend to have their set of drawbacks.
1010
Additionally nothing handles deleting releases which we need for our rolling
1111
`dev` release.
1212

13-
To handle all this this action rolls-its-own implementation using the
13+
To handle all this, this action rolls its own implementation using the
1414
actions/toolkit repository and packages published there. These run in a Docker
1515
container and take various inputs to orchestrate the release from the build.
1616

.github/workflows/autopublish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
shell: bash
3333
run: |
3434
git config --global user.email "[email protected]"
35-
git config --global user.name "Github Action"
35+
git config --global user.name "GitHub Action"
3636
rm Cargo.lock
3737
# Fix names for crates that were published before switch to kebab-case.
3838
cargo workspaces rename --from base-db base_db

.github/workflows/ci.yaml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,30 @@ env:
1818
RUSTUP_MAX_RETRIES: 10
1919

2020
jobs:
21+
changes:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
pull-requests: read
25+
outputs:
26+
typescript: ${{ steps.filter.outputs.typescript }}
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: dorny/paths-filter@4067d885736b84de7c414f582ac45897079b0a78
30+
id: filter
31+
with:
32+
filters: |
33+
typescript:
34+
- 'editors/code/**'
35+
2136
rust:
2237
if: github.repository == 'rust-lang/rust-analyzer'
2338
name: Rust
2439
runs-on: ${{ matrix.os }}
2540
env:
2641
CC: deny_c
42+
# we want to build r-a on stable to check that it keeps building on stable,
43+
# but we also want to test our proc-macro-srv which depends on nightly features
44+
RUSTC_BOOTSTRAP: 1
2745

2846
strategy:
2947
fail-fast: false
@@ -50,15 +68,15 @@ jobs:
5068
run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml
5169

5270
- name: Compile (tests)
53-
run: cargo test --no-run --locked
71+
run: cargo test --no-run --locked --features sysroot-abi
5472

5573
# It's faster to `test` before `build` ¯\_(ツ)_/¯
5674
- name: Compile (rust-analyzer)
5775
if: matrix.os == 'ubuntu-latest'
58-
run: cargo build --quiet
76+
run: cargo build --quiet --features sysroot-abi
5977

6078
- name: Test
61-
run: cargo test -- --nocapture --quiet
79+
run: cargo test --features sysroot-abi -- --nocapture --quiet
6280

6381
- name: Run analysis-stats on rust-analyzer
6482
if: matrix.os == 'ubuntu-latest'
@@ -102,6 +120,7 @@ jobs:
102120
done
103121
104122
typescript:
123+
needs: changes
105124
if: github.repository == 'rust-lang/rust-analyzer'
106125
name: TypeScript
107126
strategy:
@@ -114,45 +133,51 @@ jobs:
114133
steps:
115134
- name: Checkout repository
116135
uses: actions/checkout@v3
136+
if: needs.changes.outputs.typescript == 'true'
117137

118138
- name: Install Nodejs
119139
uses: actions/setup-node@v3
120140
with:
121141
node-version: 16
142+
if: needs.changes.outputs.typescript == 'true'
122143

123144
- name: Install xvfb
124-
if: matrix.os == 'ubuntu-latest'
145+
if: matrix.os == 'ubuntu-latest' && needs.changes.outputs.typescript == 'true'
125146
run: sudo apt-get install -y xvfb
126147

127148
- run: npm ci
128149
working-directory: ./editors/code
150+
if: needs.changes.outputs.typescript == 'true'
129151

130152
# - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; }
131153
# if: runner.os == 'Linux'
132154
# working-directory: ./editors/code
133155

134156
- run: npm run lint
135157
working-directory: ./editors/code
158+
if: needs.changes.outputs.typescript == 'true'
136159

137160
- name: Run VS Code tests (Linux)
138-
if: matrix.os == 'ubuntu-latest'
161+
if: matrix.os == 'ubuntu-latest' && needs.changes.outputs.typescript == 'true'
139162
env:
140163
VSCODE_CLI: 1
141164
run: xvfb-run npm test
142165
working-directory: ./editors/code
143166

144167
- name: Run VS Code tests (Windows)
145-
if: matrix.os == 'windows-latest'
168+
if: matrix.os == 'windows-latest' && needs.changes.outputs.typescript == 'true'
146169
env:
147170
VSCODE_CLI: 1
148171
run: npm test
149172
working-directory: ./editors/code
150173

151174
- run: npm run pretest
152175
working-directory: ./editors/code
176+
if: needs.changes.outputs.typescript == 'true'
153177

154178
- run: npm run package --scripts-prepend-node-path
155179
working-directory: ./editors/code
180+
if: needs.changes.outputs.typescript == 'true'
156181

157182
end-success:
158183
name: bors build finished
@@ -165,7 +190,7 @@ jobs:
165190

166191
end-failure:
167192
name: bors build finished
168-
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
193+
if: github.event.pusher.name == 'bors' && !success()
169194
runs-on: ubuntu-latest
170195
needs: [rust, rust-cross, typescript]
171196
steps:

.github/workflows/publish-libs.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ on:
33
workflow_dispatch:
44
push:
55
branches:
6-
- main
6+
- master
77
paths:
8-
- 'lib/**'
8+
- "lib/**"
99

1010
jobs:
1111
publish-libs:
@@ -29,7 +29,7 @@ jobs:
2929
shell: bash
3030
run: |
3131
git config --global user.email "[email protected]"
32-
git config --global user.name "Github Action"
32+
git config --global user.name "GitHub Action"
3333
# Remove r-a crates from the workspaces so we don't auto-publish them as well
3434
sed -i 's/ "crates\/\*"//' ./Cargo.toml
3535
cargo workspaces publish --yes --exact --from-git --no-git-commit --allow-dirty

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ jobs:
270270
- name: Publish Extension (Code Marketplace, nightly)
271271
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
272272
working-directory: ./editors/code
273-
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
273+
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix --pre-release
274274

275275
- name: Publish Extension (OpenVSX, nightly)
276276
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
},
7373
{
7474
// Used for testing the extension with a local build of the LSP server (in `target/release`)
75-
// with all other extendions loaded.
75+
// with all other extensions loaded.
7676
"name": "Run With Extensions",
7777
"type": "extensionHost",
7878
"request": "launch",

0 commit comments

Comments
 (0)