Skip to content

Commit f3770ce

Browse files
committed
Auto merge of rust-lang#117701 - lnicola:sync-from-ra, r=<try>
Subtree update of `rust-analyzer` r? `@HKalbasi`
2 parents 8d57ad1 + 6ad73f5 commit f3770ce

File tree

184 files changed

+15866
-3026
lines changed

Some content is hidden

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

184 files changed

+15866
-3026
lines changed

Diff for: src/bootstrap/src/core/build_steps/check.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,12 @@ impl Step for RustAnalyzer {
376376
let compiler = builder.compiler(builder.top_stage, builder.config.build);
377377
let target = self.target;
378378

379-
builder.ensure(Std::new(target));
379+
builder.ensure(Rustc::new(target, builder));
380380

381381
let mut cargo = prepare_tool_cargo(
382382
builder,
383383
compiler,
384-
Mode::ToolStd,
384+
Mode::ToolRustc,
385385
target,
386386
cargo_subcommand(builder.kind),
387387
"src/tools/rust-analyzer",
@@ -414,7 +414,7 @@ impl Step for RustAnalyzer {
414414
/// Cargo's output path in a given stage, compiled by a particular
415415
/// compiler for the specified target.
416416
fn stamp(builder: &Builder<'_>, compiler: Compiler, target: TargetSelection) -> PathBuf {
417-
builder.cargo_out(compiler, Mode::ToolStd, target).join(".rust-analyzer-check.stamp")
417+
builder.cargo_out(compiler, Mode::ToolRustc, target).join(".rust-analyzer-check.stamp")
418418
}
419419
}
420420
}

Diff for: src/bootstrap/src/core/build_steps/test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ impl Step for RustAnalyzer {
369369

370370
// We don't need to build the whole Rust Analyzer for the proc-macro-srv test suite,
371371
// but we do need the standard library to be present.
372-
builder.ensure(compile::Std::new(compiler, host));
372+
builder.ensure(compile::Rustc::new(compiler, host));
373373

374374
let workspace_path = "src/tools/rust-analyzer";
375375
// until the whole RA test suite runs on `i686`, we only run
@@ -378,7 +378,7 @@ impl Step for RustAnalyzer {
378378
let mut cargo = tool::prepare_tool_cargo(
379379
builder,
380380
compiler,
381-
Mode::ToolStd,
381+
Mode::ToolRustc,
382382
host,
383383
"test",
384384
crate_path,

Diff for: src/bootstrap/src/core/build_steps/tool.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,7 @@ pub struct RustAnalyzer {
603603
}
604604

605605
impl RustAnalyzer {
606-
pub const ALLOW_FEATURES: &'static str =
607-
"proc_macro_internals,proc_macro_diagnostic,proc_macro_span,proc_macro_span_shrink";
606+
pub const ALLOW_FEATURES: &'static str = "rustc_private,proc_macro_internals,proc_macro_diagnostic,proc_macro_span,proc_macro_span_shrink";
608607
}
609608

610609
impl Step for RustAnalyzer {
@@ -636,7 +635,7 @@ impl Step for RustAnalyzer {
636635
compiler: self.compiler,
637636
target: self.target,
638637
tool: "rust-analyzer",
639-
mode: Mode::ToolStd,
638+
mode: Mode::ToolRustc,
640639
path: "src/tools/rust-analyzer",
641640
extra_features: vec!["rust-analyzer/in-rust-tree".to_owned()],
642641
is_optional_tool: false,

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

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121

22+
# https://github.com/jlumbroso/free-disk-space/blob/main/action.yml
23+
- name: Free up some disk space
24+
run: sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup
25+
2226
- name: Install Rust toolchain
2327
run: rustup update --no-self-update stable
2428

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

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- auto
1010
- try
11+
- automation/bors/try
1112

1213
env:
1314
CARGO_INCREMENTAL: 0
@@ -84,6 +85,7 @@ jobs:
8485
run: cargo build --quiet ${{ env.USE_SYSROOT_ABI }}
8586

8687
- name: Test
88+
if: matrix.os == 'ubuntu-latest' || github.event_name == 'push'
8789
run: cargo test ${{ env.USE_SYSROOT_ABI }} -- --nocapture --quiet
8890

8991
- name: Switch to stable toolchain

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,14 @@ jobs:
140140

141141
- name: Combine json
142142
run: |
143-
git clone --depth 1 https://$METRICS_TOKEN@github.com/rust-analyzer/metrics.git
143+
mkdir ~/.ssh
144+
echo "${{ secrets.METRICS_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
145+
chmod 600 ~/.ssh/id_ed25519
146+
chmod 700 ~/.ssh
147+
148+
git clone --depth 1 git@github.com:rust-analyzer/metrics.git
144149
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
145150
cd metrics
146151
git add .
147152
git -c user.name=Bot -c user.email=dummy@example.com commit --message 📈
148153
git push origin master
149-
env:
150-
METRICS_TOKEN: ${{ secrets.METRICS_TOKEN }}

0 commit comments

Comments
 (0)