Skip to content

Commit 45809b0

Browse files
committed
Merge branch 'master' into basic-test-explorer
2 parents 51edb8f + cc6c820 commit 45809b0

File tree

392 files changed

+15935
-5883
lines changed

Some content is hidden

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

392 files changed

+15935
-5883
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ lint = "clippy --all-targets -- -Aclippy::collapsible_if -Aclippy::needless_pass
88
linker = "rust-lld"
99

1010
[env]
11-
CARGO_WORKSPACE_DIR = { value = "", relative = true }
11+
CARGO_WORKSPACE_DIR = { value = "", relative = true }

.editorconfig

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ trim_trailing_whitespace = true
77
end_of_line = lf
88
insert_final_newline = true
99
indent_style = space
10-
11-
[*.{rs,toml}]
1210
indent_size = 4
1311

14-
[*.ts]
15-
indent_size = 4
16-
[*.js]
17-
indent_size = 4
18-
[*.json]
19-
indent_size = 4
12+
[*.md]
13+
indent_size = 2
14+
15+
[*.{yml, yaml}]
16+
indent_size = 2

.github/workflows/ci.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,20 @@ jobs:
8686
- name: Test
8787
run: cargo test ${{ env.USE_SYSROOT_ABI }} -- --nocapture --quiet
8888

89+
- name: Switch to stable toolchain
90+
run: |
91+
rustup update --no-self-update stable
92+
rustup component add --toolchain stable rust-src
93+
rustup default stable
94+
8995
- name: Run analysis-stats on rust-analyzer
9096
if: matrix.os == 'ubuntu-latest'
9197
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats .
9298

9399
- name: Run analysis-stats on rust std library
94100
if: matrix.os == 'ubuntu-latest'
101+
env:
102+
RUSTC_BOOTSTRAP: 1
95103
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std
96104

97105
# Weird targets to catch non-portable code
@@ -161,10 +169,21 @@ jobs:
161169
# if: runner.os == 'Linux'
162170
# working-directory: ./editors/code
163171

172+
# If this steps fails, your code's type integrity might be wrong at some places at TypeScript level.
173+
- run: npm run typecheck
174+
working-directory: ./editors/code
175+
if: needs.changes.outputs.typescript == 'true'
176+
177+
# You may fix the code automatically by running `npm run lint:fix` if this steps fails.
164178
- run: npm run lint
165179
working-directory: ./editors/code
166180
if: needs.changes.outputs.typescript == 'true'
167181

182+
# To fix this steps, please run `npm run format`.
183+
- run: npm run format:check
184+
working-directory: ./editors/code
185+
if: needs.changes.outputs.typescript == 'true'
186+
168187
- name: Run VS Code tests (Linux)
169188
if: matrix.os == 'ubuntu-latest' && needs.changes.outputs.typescript == 'true'
170189
env:
@@ -179,10 +198,6 @@ jobs:
179198
run: npm test
180199
working-directory: ./editors/code
181200

182-
- run: npm run pretest
183-
working-directory: ./editors/code
184-
if: needs.changes.outputs.typescript == 'true'
185-
186201
- run: npm run package --scripts-prepend-node-path
187202
working-directory: ./editors/code
188203
if: needs.changes.outputs.typescript == 'true'

.github/workflows/metrics.yaml

Lines changed: 101 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: metrics
22
on:
33
push:
4-
branches:
5-
- master
4+
branches:
5+
- master
66

77
env:
88
CARGO_INCREMENTAL: 0
@@ -19,6 +19,7 @@ jobs:
1919
run: |
2020
rustup update --no-self-update stable
2121
rustup component add rustfmt rust-src
22+
rustup default stable
2223
- name: Cache cargo
2324
uses: actions/cache@v3
2425
with:
@@ -34,112 +35,116 @@ jobs:
3435
needs: setup_cargo
3536

3637
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v3
39-
40-
- name: Restore cargo cache
41-
uses: actions/cache@v3
42-
with:
43-
path: |
44-
~/.cargo/bin/
45-
~/.cargo/registry/index/
46-
~/.cargo/registry/cache/
47-
~/.cargo/git/db/
48-
key: ${{ runner.os }}-cargo-${{ github.sha }}
49-
50-
51-
- name: Collect build metrics
52-
run: cargo xtask metrics build
53-
54-
- name: Cache target
55-
uses: actions/cache@v3
56-
with:
57-
path: target/
58-
key: ${{ runner.os }}-target-${{ github.sha }}
59-
60-
- name: Upload build metrics
61-
uses: actions/upload-artifact@v3
62-
with:
63-
name: build-${{ github.sha }}
64-
path: target/build.json
65-
if-no-files-found: error
38+
- name: Checkout repository
39+
uses: actions/checkout@v3
40+
41+
- name: Restore cargo cache
42+
uses: actions/cache@v3
43+
with:
44+
path: |
45+
~/.cargo/bin/
46+
~/.cargo/registry/index/
47+
~/.cargo/registry/cache/
48+
~/.cargo/git/db/
49+
key: ${{ runner.os }}-cargo-${{ github.sha }}
50+
51+
- name: Collect build metrics
52+
run: cargo xtask metrics build
53+
54+
- name: Cache target
55+
uses: actions/cache@v3
56+
with:
57+
path: target/
58+
key: ${{ runner.os }}-target-${{ github.sha }}
59+
60+
- name: Upload build metrics
61+
uses: actions/upload-artifact@v3
62+
with:
63+
name: build-${{ github.sha }}
64+
path: target/build.json
65+
if-no-files-found: error
6666

6767
other_metrics:
6868
strategy:
6969
matrix:
70-
names: [self, ripgrep, webrender, diesel]
70+
names: [self, ripgrep-13.0.0, webrender-2022, diesel-1.4.8, hyper-0.14.18]
7171
runs-on: ubuntu-latest
7272
needs: [setup_cargo, build_metrics]
7373

7474
steps:
75-
- name: Checkout repository
76-
uses: actions/checkout@v3
77-
78-
- name: Restore cargo cache
79-
uses: actions/cache@v3
80-
with:
81-
path: |
82-
~/.cargo/bin/
83-
~/.cargo/registry/index/
84-
~/.cargo/registry/cache/
85-
~/.cargo/git/db/
86-
key: ${{ runner.os }}-cargo-${{ github.sha }}
87-
88-
- name: Restore target cache
89-
uses: actions/cache@v3
90-
with:
91-
path: target/
92-
key: ${{ runner.os }}-target-${{ github.sha }}
93-
94-
- name: Collect metrics
95-
run: cargo xtask metrics ${{ matrix.names }}
96-
97-
- name: Upload metrics
98-
uses: actions/upload-artifact@v3
99-
with:
100-
name: ${{ matrix.names }}-${{ github.sha }}
101-
path: target/${{ matrix.names }}.json
102-
if-no-files-found: error
75+
- name: Checkout repository
76+
uses: actions/checkout@v3
77+
78+
- name: Restore cargo cache
79+
uses: actions/cache@v3
80+
with:
81+
path: |
82+
~/.cargo/bin/
83+
~/.cargo/registry/index/
84+
~/.cargo/registry/cache/
85+
~/.cargo/git/db/
86+
key: ${{ runner.os }}-cargo-${{ github.sha }}
87+
88+
- name: Restore target cache
89+
uses: actions/cache@v3
90+
with:
91+
path: target/
92+
key: ${{ runner.os }}-target-${{ github.sha }}
93+
94+
- name: Collect metrics
95+
run: cargo xtask metrics "${{ matrix.names }}"
96+
97+
- name: Upload metrics
98+
uses: actions/upload-artifact@v3
99+
with:
100+
name: ${{ matrix.names }}-${{ github.sha }}
101+
path: target/${{ matrix.names }}.json
102+
if-no-files-found: error
103103

104104
generate_final_metrics:
105105
runs-on: ubuntu-latest
106106
needs: [build_metrics, other_metrics]
107107
steps:
108-
- name: Checkout repository
109-
uses: actions/checkout@v3
110-
111-
- name: Download build metrics
112-
uses: actions/download-artifact@v3
113-
with:
114-
name: build-${{ github.sha }}
115-
116-
- name: Download self metrics
117-
uses: actions/download-artifact@v3
118-
with:
119-
name: self-${{ github.sha }}
120-
121-
- name: Download ripgrep metrics
122-
uses: actions/download-artifact@v3
123-
with:
124-
name: ripgrep-${{ github.sha }}
125-
126-
- name: Download webrender metrics
127-
uses: actions/download-artifact@v3
128-
with:
129-
name: webrender-${{ github.sha }}
130-
131-
- name: Download diesel metrics
132-
uses: actions/download-artifact@v3
133-
with:
134-
name: diesel-${{ github.sha }}
135-
136-
- name: Combine json
137-
run: |
138-
git clone --depth 1 https://[email protected]/rust-analyzer/metrics.git
139-
jq -s ".[0] * .[1] * .[2] * .[3] * .[4]" build.json self.json ripgrep.json webrender.json diesel.json -c >> metrics/metrics.json
140-
cd metrics
141-
git add .
142-
git -c user.name=Bot -c [email protected] commit --message 📈
143-
git push origin master
108+
- name: Checkout repository
109+
uses: actions/checkout@v3
110+
111+
- name: Download build metrics
112+
uses: actions/download-artifact@v3
113+
with:
114+
name: build-${{ github.sha }}
115+
116+
- name: Download self metrics
117+
uses: actions/download-artifact@v3
118+
with:
119+
name: self-${{ github.sha }}
120+
121+
- name: Download ripgrep-13.0.0 metrics
122+
uses: actions/download-artifact@v3
123+
with:
124+
name: ripgrep-13.0.0-${{ github.sha }}
125+
126+
- name: Download webrender-2022 metrics
127+
uses: actions/download-artifact@v3
128+
with:
129+
name: webrender-2022-${{ github.sha }}
130+
131+
- name: Download diesel-1.4.8 metrics
132+
uses: actions/download-artifact@v3
133+
with:
134+
name: diesel-1.4.8-${{ github.sha }}
135+
136+
- name: Download hyper-0.14.18 metrics
137+
uses: actions/download-artifact@v3
138+
with:
139+
name: hyper-0.14.18-${{ github.sha }}
140+
141+
- name: Combine json
142+
run: |
143+
git clone --depth 1 https://[email protected]/rust-analyzer/metrics.git
144+
jq -s ".[0] * .[1] * .[2] * .[3] * .[4] * .[5]" build.json self.json ripgrep-13.0.0.json webrender-2022.json diesel-1.4.8.json hyper-0.14.18.json -c >> metrics/metrics.json
145+
cd metrics
146+
git add .
147+
git -c user.name=Bot -c [email protected] commit --message 📈
148+
git push origin master
144149
env:
145150
METRICS_TOKEN: ${{ secrets.METRICS_TOKEN }}

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ jobs:
128128

129129
- name: Run analysis-stats on rust std library
130130
if: matrix.target == 'x86_64-unknown-linux-gnu'
131+
env:
132+
RUSTC_BOOTSTRAP: 1
131133
run: target/${{ matrix.target }}/release/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std
132134

133135
- name: Upload artifacts

0 commit comments

Comments
 (0)