Skip to content

Commit b18db7a

Browse files
committed
Merge commit '258b15c506a2d3ad862fd17ae24eaf272443f477' into sync-from-ra
2 parents 078eb11 + 258b15c commit b18db7a

File tree

195 files changed

+5763
-2740
lines changed

Some content is hidden

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

195 files changed

+5763
-2740
lines changed

Diff for: src/tools/rust-analyzer/.cargo/config.toml

+1-1
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 }

Diff for: src/tools/rust-analyzer/.github/workflows/ci.yaml

+8
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

Diff for: src/tools/rust-analyzer/.github/workflows/metrics.yaml

+14-9
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
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

@@ -92,7 +92,7 @@ jobs:
9292
key: ${{ runner.os }}-target-${{ github.sha }}
9393

9494
- name: Collect metrics
95-
run: cargo xtask metrics ${{ matrix.names }}
95+
run: cargo xtask metrics "${{ matrix.names }}"
9696

9797
- name: Upload metrics
9898
uses: actions/upload-artifact@v3
@@ -118,25 +118,30 @@ jobs:
118118
with:
119119
name: self-${{ github.sha }}
120120

121-
- name: Download ripgrep metrics
121+
- name: Download ripgrep-13.0.0 metrics
122122
uses: actions/download-artifact@v3
123123
with:
124-
name: ripgrep-${{ github.sha }}
124+
name: ripgrep-13.0.0-${{ github.sha }}
125125

126-
- name: Download webrender metrics
126+
- name: Download webrender-2022 metrics
127127
uses: actions/download-artifact@v3
128128
with:
129-
name: webrender-${{ github.sha }}
129+
name: webrender-2022-${{ github.sha }}
130130

131-
- name: Download diesel metrics
131+
- name: Download diesel-1.4.8 metrics
132132
uses: actions/download-artifact@v3
133133
with:
134-
name: diesel-${{ github.sha }}
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 }}
135140

136141
- name: Combine json
137142
run: |
138143
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
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
140145
cd metrics
141146
git add .
142147
git -c user.name=Bot -c [email protected] commit --message 📈

Diff for: src/tools/rust-analyzer/.github/workflows/release.yaml

+2
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

Diff for: src/tools/rust-analyzer/Cargo.lock

+54-60
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,14 @@ dependencies = [
381381

382382
[[package]]
383383
name = "filetime"
384-
version = "0.2.19"
384+
version = "0.2.22"
385385
source = "registry+https://github.com/rust-lang/crates.io-index"
386-
checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9"
386+
checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0"
387387
dependencies = [
388388
"cfg-if",
389389
"libc",
390-
"redox_syscall",
391-
"windows-sys 0.42.0",
390+
"redox_syscall 0.3.5",
391+
"windows-sys 0.48.0",
392392
]
393393

394394
[[package]]
@@ -541,6 +541,7 @@ dependencies = [
541541
"mbe",
542542
"once_cell",
543543
"profile",
544+
"ra-ap-rustc_parse_format",
544545
"rustc-hash",
545546
"smallvec",
546547
"stdx",
@@ -854,7 +855,6 @@ version = "0.0.0"
854855
dependencies = [
855856
"dashmap",
856857
"hashbrown 0.12.3",
857-
"once_cell",
858858
"rustc-hash",
859859
"triomphe",
860860
]
@@ -999,7 +999,7 @@ checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
999999

10001000
[[package]]
10011001
name = "lsp-server"
1002-
version = "0.7.3"
1002+
version = "0.7.4"
10031003
dependencies = [
10041004
"crossbeam-channel",
10051005
"log",
@@ -1010,9 +1010,9 @@ dependencies = [
10101010

10111011
[[package]]
10121012
name = "lsp-server"
1013-
version = "0.7.3"
1013+
version = "0.7.4"
10141014
source = "registry+https://github.com/rust-lang/crates.io-index"
1015-
checksum = "72417faa455bfb4e5bf14b157d8e2ca2ed74b4e89b8cf42ea2d864825ae5c8a2"
1015+
checksum = "b52dccdf3302eefab8c8a1273047f0a3c3dca4b527c8458d00c09484c8371928"
10161016
dependencies = [
10171017
"crossbeam-channel",
10181018
"log",
@@ -1149,20 +1149,21 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
11491149

11501150
[[package]]
11511151
name = "notify"
1152-
version = "5.1.0"
1152+
version = "6.1.1"
11531153
source = "registry+https://github.com/rust-lang/crates.io-index"
1154-
checksum = "58ea850aa68a06e48fdb069c0ec44d0d64c8dbffa49bf3b6f7f0a901fdea1ba9"
1154+
checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d"
11551155
dependencies = [
1156-
"bitflags 1.3.2",
1156+
"bitflags 2.3.2",
11571157
"crossbeam-channel",
11581158
"filetime",
11591159
"fsevent-sys",
11601160
"inotify",
11611161
"kqueue",
11621162
"libc",
1163+
"log",
11631164
"mio",
11641165
"walkdir",
1165-
"windows-sys 0.42.0",
1166+
"windows-sys 0.48.0",
11661167
]
11671168

11681169
[[package]]
@@ -1251,7 +1252,7 @@ dependencies = [
12511252
"cfg-if",
12521253
"instant",
12531254
"libc",
1254-
"redox_syscall",
1255+
"redox_syscall 0.2.16",
12551256
"smallvec",
12561257
"winapi",
12571258
]
@@ -1264,7 +1265,7 @@ checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf"
12641265
dependencies = [
12651266
"cfg-if",
12661267
"libc",
1267-
"redox_syscall",
1268+
"redox_syscall 0.2.16",
12681269
"smallvec",
12691270
"windows-sys 0.42.0",
12701271
]
@@ -1481,16 +1482,36 @@ dependencies = [
14811482
"proc-macro2",
14821483
]
14831484

1485+
[[package]]
1486+
name = "ra-ap-rustc_index"
1487+
version = "0.10.0"
1488+
source = "registry+https://github.com/rust-lang/crates.io-index"
1489+
checksum = "07b5fa61d34da18e148dc3a81f654488ea07f40938d8aefb17f8b64bb78c6120"
1490+
dependencies = [
1491+
"arrayvec",
1492+
"smallvec",
1493+
]
1494+
14841495
[[package]]
14851496
name = "ra-ap-rustc_lexer"
1486-
version = "0.1.0"
1497+
version = "0.10.0"
14871498
source = "registry+https://github.com/rust-lang/crates.io-index"
1488-
checksum = "e1c145702ed3f237918e512685185dc8a4d0edc3a5326c63d20361d8ba9b45b3"
1499+
checksum = "f2e2f6b48422e4eed5218277ab7cc9733e60dd8f3167f4f36a49a0cafe4dc195"
14891500
dependencies = [
1490-
"unic-emoji-char",
1501+
"unicode-properties",
14911502
"unicode-xid",
14921503
]
14931504

1505+
[[package]]
1506+
name = "ra-ap-rustc_parse_format"
1507+
version = "0.10.0"
1508+
source = "registry+https://github.com/rust-lang/crates.io-index"
1509+
checksum = "c3c7369ad01cc79f9e3513c9f6a6326f6b980100e4862a7ac71b9991c88108bb"
1510+
dependencies = [
1511+
"ra-ap-rustc_index",
1512+
"ra-ap-rustc_lexer",
1513+
]
1514+
14941515
[[package]]
14951516
name = "rayon"
14961517
version = "1.7.0"
@@ -1522,6 +1543,15 @@ dependencies = [
15221543
"bitflags 1.3.2",
15231544
]
15241545

1546+
[[package]]
1547+
name = "redox_syscall"
1548+
version = "0.3.5"
1549+
source = "registry+https://github.com/rust-lang/crates.io-index"
1550+
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
1551+
dependencies = [
1552+
"bitflags 1.3.2",
1553+
]
1554+
15251555
[[package]]
15261556
name = "rowan"
15271557
version = "0.15.11"
@@ -1545,7 +1575,6 @@ dependencies = [
15451575
"crossbeam-channel",
15461576
"dissimilar",
15471577
"expect-test",
1548-
"filetime",
15491578
"flycheck",
15501579
"hir",
15511580
"hir-def",
@@ -1555,7 +1584,7 @@ dependencies = [
15551584
"ide-ssr",
15561585
"itertools",
15571586
"load-cargo",
1558-
"lsp-server 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
1587+
"lsp-server 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
15591588
"lsp-types",
15601589
"mbe",
15611590
"mimalloc",
@@ -2056,47 +2085,6 @@ version = "1.16.1"
20562085
source = "registry+https://github.com/rust-lang/crates.io-index"
20572086
checksum = "a3e5df347f0bf3ec1d670aad6ca5c6a1859cd9ea61d2113125794654ccced68f"
20582087

2059-
[[package]]
2060-
name = "unic-char-property"
2061-
version = "0.9.0"
2062-
source = "registry+https://github.com/rust-lang/crates.io-index"
2063-
checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221"
2064-
dependencies = [
2065-
"unic-char-range",
2066-
]
2067-
2068-
[[package]]
2069-
name = "unic-char-range"
2070-
version = "0.9.0"
2071-
source = "registry+https://github.com/rust-lang/crates.io-index"
2072-
checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc"
2073-
2074-
[[package]]
2075-
name = "unic-common"
2076-
version = "0.9.0"
2077-
source = "registry+https://github.com/rust-lang/crates.io-index"
2078-
checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc"
2079-
2080-
[[package]]
2081-
name = "unic-emoji-char"
2082-
version = "0.9.0"
2083-
source = "registry+https://github.com/rust-lang/crates.io-index"
2084-
checksum = "0b07221e68897210270a38bde4babb655869637af0f69407f96053a34f76494d"
2085-
dependencies = [
2086-
"unic-char-property",
2087-
"unic-char-range",
2088-
"unic-ucd-version",
2089-
]
2090-
2091-
[[package]]
2092-
name = "unic-ucd-version"
2093-
version = "0.9.0"
2094-
source = "registry+https://github.com/rust-lang/crates.io-index"
2095-
checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4"
2096-
dependencies = [
2097-
"unic-common",
2098-
]
2099-
21002088
[[package]]
21012089
name = "unicase"
21022090
version = "2.6.0"
@@ -2127,6 +2115,12 @@ dependencies = [
21272115
"tinyvec",
21282116
]
21292117

2118+
[[package]]
2119+
name = "unicode-properties"
2120+
version = "0.1.0"
2121+
source = "registry+https://github.com/rust-lang/crates.io-index"
2122+
checksum = "c7f91c8b21fbbaa18853c3d0801c78f4fc94cdb976699bb03e832e75f7fd22f0"
2123+
21302124
[[package]]
21312125
name = "unicode-segmentation"
21322126
version = "1.10.1"

Diff for: src/tools/rust-analyzer/Cargo.toml

+8-4
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ proc-macro-test = { path = "./crates/proc-macro-test" }
8686
# In-tree crates that are published separately and follow semver. See lib/README.md
8787
line-index = { version = "0.1.0-pre.1" }
8888
la-arena = { version = "0.3.1" }
89-
lsp-server = { version = "0.7.3" }
89+
lsp-server = { version = "0.7.4" }
9090

9191
# non-local crates
9292
smallvec = { version = "1.10.0", features = [
@@ -97,11 +97,15 @@ smallvec = { version = "1.10.0", features = [
9797
smol_str = "0.2.0"
9898
nohash-hasher = "0.2.0"
9999
text-size = "1.1.0"
100-
# See https://github.com/serde-rs/serde/issues/2538#issuecomment-1684517372 for why we pin serde
101-
serde = { version = "1.0.156, < 1.0.172", features = ["derive"] }
100+
serde = { version = "1.0.156", features = ["derive"] }
102101
serde_json = "1.0.96"
103102
triomphe = { version = "0.1.8", default-features = false, features = ["std"] }
104103
# can't upgrade due to dashmap depending on 0.12.3 currently
105104
hashbrown = { version = "0.12.3", features = ["inline-more"], default-features = false }
106105

107-
rustc_lexer = { version = "0.1.0", package = "ra-ap-rustc_lexer" }
106+
rustc_lexer = { version = "0.10.0", package = "ra-ap-rustc_lexer" }
107+
rustc_parse_format = { version = "0.10.0", package = "ra-ap-rustc_parse_format", default-features = false }
108+
109+
# Upstream broke this for us so we can't update it
110+
rustc_abi = { version = "0.0.20221221", package = "hkalbasi-rustc-ap-rustc_abi", default-features = false }
111+
rustc_index = { version = "0.0.20221221", package = "hkalbasi-rustc-ap-rustc_index", default-features = false }

Diff for: src/tools/rust-analyzer/crates/base-db/src/fixture.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ impl ChangeFixture {
179179
meta.edition,
180180
Some(crate_name.clone().into()),
181181
version,
182-
meta.cfg,
183-
Default::default(),
182+
meta.cfg.clone(),
183+
Some(meta.cfg),
184184
meta.env,
185185
false,
186186
origin,
@@ -200,7 +200,7 @@ impl ChangeFixture {
200200
} else if meta.path == "/main.rs" || meta.path == "/lib.rs" {
201201
assert!(default_crate_root.is_none());
202202
default_crate_root = Some(file_id);
203-
default_cfg = meta.cfg;
203+
default_cfg.extend(meta.cfg.into_iter());
204204
default_env.extend(meta.env.iter().map(|(x, y)| (x.to_owned(), y.to_owned())));
205205
default_target_data_layout = meta.target_data_layout;
206206
}
@@ -220,8 +220,8 @@ impl ChangeFixture {
220220
Edition::CURRENT,
221221
Some(CrateName::new("test").unwrap().into()),
222222
None,
223-
default_cfg,
224-
Default::default(),
223+
default_cfg.clone(),
224+
Some(default_cfg),
225225
default_env,
226226
false,
227227
CrateOrigin::Local { repo: None, name: None },

0 commit comments

Comments
 (0)