Skip to content

Commit d39b45a

Browse files
committed
Merge branch 'master' into sync-from-rust
2 parents 7e786ea + 0566644 commit d39b45a

File tree

195 files changed

+5768
-2741
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

+5768
-2741
lines changed

.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 }

.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

.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 📈

.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

Cargo.lock

+54-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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 }

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)