Skip to content

Commit

Permalink
Auto merge of rust-lang#117701 - lnicola:sync-from-ra, r=<try>
Browse files Browse the repository at this point in the history
Subtree update of `rust-analyzer`

r? `@HKalbasi`
  • Loading branch information
bors committed Nov 14, 2023
2 parents 8d57ad1 + 6ad73f5 commit f3770ce
Show file tree
Hide file tree
Showing 184 changed files with 15,866 additions and 3,026 deletions.
6 changes: 3 additions & 3 deletions src/bootstrap/src/core/build_steps/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,12 @@ impl Step for RustAnalyzer {
let compiler = builder.compiler(builder.top_stage, builder.config.build);
let target = self.target;

builder.ensure(Std::new(target));
builder.ensure(Rustc::new(target, builder));

let mut cargo = prepare_tool_cargo(
builder,
compiler,
Mode::ToolStd,
Mode::ToolRustc,
target,
cargo_subcommand(builder.kind),
"src/tools/rust-analyzer",
Expand Down Expand Up @@ -414,7 +414,7 @@ impl Step for RustAnalyzer {
/// Cargo's output path in a given stage, compiled by a particular
/// compiler for the specified target.
fn stamp(builder: &Builder<'_>, compiler: Compiler, target: TargetSelection) -> PathBuf {
builder.cargo_out(compiler, Mode::ToolStd, target).join(".rust-analyzer-check.stamp")
builder.cargo_out(compiler, Mode::ToolRustc, target).join(".rust-analyzer-check.stamp")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ impl Step for RustAnalyzer {

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

let workspace_path = "src/tools/rust-analyzer";
// until the whole RA test suite runs on `i686`, we only run
Expand All @@ -378,7 +378,7 @@ impl Step for RustAnalyzer {
let mut cargo = tool::prepare_tool_cargo(
builder,
compiler,
Mode::ToolStd,
Mode::ToolRustc,
host,
"test",
crate_path,
Expand Down
5 changes: 2 additions & 3 deletions src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,7 @@ pub struct RustAnalyzer {
}

impl RustAnalyzer {
pub const ALLOW_FEATURES: &'static str =
"proc_macro_internals,proc_macro_diagnostic,proc_macro_span,proc_macro_span_shrink";
pub const ALLOW_FEATURES: &'static str = "rustc_private,proc_macro_internals,proc_macro_diagnostic,proc_macro_span,proc_macro_span_shrink";
}

impl Step for RustAnalyzer {
Expand Down Expand Up @@ -636,7 +635,7 @@ impl Step for RustAnalyzer {
compiler: self.compiler,
target: self.target,
tool: "rust-analyzer",
mode: Mode::ToolStd,
mode: Mode::ToolRustc,
path: "src/tools/rust-analyzer",
extra_features: vec!["rust-analyzer/in-rust-tree".to_owned()],
is_optional_tool: false,
Expand Down
4 changes: 4 additions & 0 deletions src/tools/rust-analyzer/.github/workflows/autopublish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
with:
fetch-depth: 0

# https://github.com/jlumbroso/free-disk-space/blob/main/action.yml
- name: Free up some disk space
run: sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup

- name: Install Rust toolchain
run: rustup update --no-self-update stable

Expand Down
2 changes: 2 additions & 0 deletions src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- auto
- try
- automation/bors/try

env:
CARGO_INCREMENTAL: 0
Expand Down Expand Up @@ -84,6 +85,7 @@ jobs:
run: cargo build --quiet ${{ env.USE_SYSROOT_ABI }}

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

- name: Switch to stable toolchain
Expand Down
9 changes: 6 additions & 3 deletions src/tools/rust-analyzer/.github/workflows/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,14 @@ jobs:

- name: Combine json
run: |
git clone --depth 1 https://[email protected]/rust-analyzer/metrics.git
mkdir ~/.ssh
echo "${{ secrets.METRICS_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
chmod 700 ~/.ssh
git clone --depth 1 [email protected]:rust-analyzer/metrics.git
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
cd metrics
git add .
git -c user.name=Bot -c [email protected] commit --message 📈
git push origin master
env:
METRICS_TOKEN: ${{ secrets.METRICS_TOKEN }}
Loading

0 comments on commit f3770ce

Please sign in to comment.