Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Rust: Update rust-analyzer to 0.0.352

オープン
#22,660 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
github-actions, rust

調査の方向性

The update process is documented in rust/updating-rust-analyzer.md. The script rust/scripts/update_rust_analyzer.py automates part of it. Key files to modify are Cargo.toml, Cargo.lock, MODULE.bazel, and rust-toolchain.toml. After updating dependencies, run bazel mod tidy and the codegen command bazel run //rust/ast-generator. Validate with cargo check --workspace and bazel run //rust/extractor:install. The change requires understanding of the project's Rust/Bazel build system and the rust-analyzer integration.

索引モデルが issue の本文から書いたものです。

説明

agentic-workflows

Summary

Automated update of rust-analyzer and its ra_ap_* crates from 0.0.347 to 0.0.352 (ra_ap_intern pinned to 0.0.352 to keep all ra_ap_* crates aligned, per rust/updating-rust-analyzer.md), following the process in rust/updating-rust-analyzer.md.

The automated updater script (rust/scripts/update_rust_analyzer.py) got as far as cargo upgrade --incompatible --pinned and then failed because the recursive dependency resolution hit a yanked transitive crate (chacha20 0.10.1, pulled in by rand). This PR manually completes the remaining steps of the documented update process.

Changes

  1. Cargo: Upgrade dependencies — Upgraded ra_ap_* crates to 0.0.352 (downgrading ra_ap_intern from the 0.0.353 picked by cargo upgrade down to 0.0.352 so all ra_ap_* crates agree), plus either, clap, serde_with, toml, syn, zstd, rand. Worked around the yanked chacha20 0.10.1 by pinning chacha20 to 0.10.2 in Cargo.lock.
  2. Rust: Update rust-analyzer sources — Updated RUST_ANALYZER_SRC_TAG/RUST_ANALYZER_SRC_INTEGRITY in MODULE.bazel to the 2026-09-14 rust-analyzer release matching ra_ap_syntax@0.0.352.
  3. Rust: Update fixed toolchain — Bumped FIXED_RUST_TOOLCHAIN (and the matching rustup toolchain install commands in test setup scripts) from 1.97.0 to 1.98.1, the latest stable release preceding the new rust-analyzer version.
  4. Bazel: Regenerate vendored cargo dependencies — Re-ran misc/bazel/3rdparty/update_tree_sitter_extractors_deps.sh and bazel mod tidy.
  5. Rust: Run codegen — Re-ran bazel run (rust/redacted) The rust-analyzer patch (rust/ast-generator/patches/rust-analyzer.patch) needed a small update since upstream removed the #![allow(clippy::disallowed_types)]line it used to target; the patch was regenerated to match the new upstream file (same effective changes: allow warnings/clippy/rustfmt-skip on the generated modules, make a few generator internalspub`).
    • The new rust-analyzer grammar adds a DocComment node alongside Attr, both now implementing a common AnyAttr supertype. Codegen propagated this into rust/schema/ast.py, rust/ql/lib/rust.dbscheme, and the generated .qll/Rust files (new AnyAttr/DocComment classes and QL library files).
    • The extractor's generated emit_any_attr/emit_doc_comment methods are currently unused (dead-code warning) because upstream hasn't yet wired DocComment into any grammar rule that would call them; this is expected with this rust-analyzer version and not a regression.
  6. Rust: Add schema upgrade/downgrade scripts and change note — Since the dbscheme changed (new any_attr union type and doc_comments relation), added upgrade/downgrade scripts via misc/scripts/prepare-db-upgrade.sh --lang rust (both marked compatibility: full, since the change is purely additive and not yet populated by the extractor) and a change note under rust/ql/lib/change-notes/.
  7. Rust: Update rust-toolchain.toml to 1.98 — Bumped the local dev channel in rust-toolchain.toml from 1.97 to 1.98 to match the new ra_ap_* MSRV, needed for rust/lint.py (cargo fmt/clippy) to run.

Validation

  • cargo check --workspace — passes with the new dependency versions.
  • bazel run (rust/redacted) — succeeds (only pre-existing/expected WARNING no test source in ...` messages and the new dead-code warning noted above).
  • bazel run (rust/redacted):install — succeeds; the extractor pack builds and installs to rust/extractor-pack.
  • rust/lint.py (cargo fmt + cargo clippy --fix -D warnings) — passes on all rust/-related crates it targets, after bumping to the 1.98 toolchain. (Unrelated cargo fmt/clippy drift in shared/yeast-schema and unified/swift-syntax-rs, and a pre-existing clippy::unnecessary_unwrap error in shared/yeast-schema, were verified to already exist on main and were left untouched to keep this diff focused.)
  • cargo test --workspace — all tests pass except the pre-existing ast-generator's codegen::grammar::test, which fails on both main and this branch when run outside the Bazel sandbox (it depends on crates/syntax/rust.ungram being injected by bazel run (rust/redacted), and even then relies on a project_root()path only valid under Bazel's runfiles layout); this crate has no dedicated CI job today (onlybazel run (rust/redacted), which passed).

Known limitations / follow-ups for a maintainer

  • CI has not run for this PR yet — this PR was prepared and validated entirely locally/offline; its own CI run (once triggered) should be checked, especially the Rust extractor test suite, DCA, and the rust-analyzer-update workflow's own checks.
  • Per rust/updating-rust-analyzer.md step 8, DCA with database caching disabled should be run and iterated on if needed — not done here since it requires CI infrastructure.
  • The new AnyAttr/DocComment classes are currently unreachable from any concrete extraction path (rust-analyzer's grammar hasn't yet started emitting DocComment nodes in place of/alongside Attr), so no QL tests were added for them; a future rust-analyzer update that actually wires up DocComment may require additional extractor/test work.
  • The environment's proxy blocked go.dev/golang.google.cn downloads during bazel mod tidy; this did not prevent the vendored deps regeneration from completing, but a maintainer running this in a different network environment may see different/no such warnings.

[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Original error: ERR_VALIDATION: pushSignedCommits: refusing unsigned push for branch 'automation/update-rust-analyzer/rust/rust-analyzer-update-docs-c04a3264256ee0d2': Signed-commit payload violates file-protection policy (deny): .github/workflows/update-rust-analyzer.lock.yml, .github/workflows/update-rust-analyzer.md

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

Create the pull request manually
# Download the artifact from the workflow run
gh run download '35830815823' -n agent -D '/tmp/agent-35830815823'

# Resolve the bundle source ref, fetch it into a temporary ref, then create the local branch
bundle_path='/tmp/agent-35830815823/aw-rust-rust-analyzer-update-docs.bundle'
temp_ref='refs/bundles/create-pr-automation-update-rust-analyzer-rust-rust-analyzer-update-docs-c04a3264256ee0d2-e294d6ed'
target_ref='refs/heads/automation/update-rust-analyzer/rust/rust-analyzer-update-docs-c04a3264256ee0d2'
bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 ~ /^refs\/heads\// { print $2 }')
if [ -z "$bundle_source_ref" ]; then
  bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 == "HEAD" { print $2 }')
fi
if [ "$(printf '%s\n' "$bundle_source_ref" | sed '/^$/d' | wc -l | tr -d ' ')" != "1" ]; then
  echo "Expected exactly one bundle source ref, found: $bundle_source_ref" >&2
  exit 1
fi
git fetch "$bundle_path" "${bundle_source_ref}:${temp_ref}"
git update-ref "$target_ref" "$temp_ref"
git checkout 'automation/update-rust-analyzer/rust/rust-analyzer-update-docs-c04a3264256ee0d2'
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d "$temp_ref"

# Push the branch to the target remote
git push 'origin' 'automation/update-rust-analyzer/rust/rust-analyzer-update-docs-c04a3264256ee0d2'

# Create the pull request
gh pr create --title 'Rust: Update rust-analyzer to 0.0.352' --base 'main' --head 'automation/update-rust-analyzer/rust/rust-analyzer-update-docs-c04a3264256ee0d2' --repo 'github/codeql'

[!WARNING]

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • go.dev
  • golang.google.cn

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "go.dev"
    - "golang.google.cn"

See Network Configuration for more information.

Generated by 🦀 Update rust-analyzer · copilot · auto · 576.3 AIC · ⌖ 17.1 AIC · ⊞ 6.9K · ◷

主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 17時間
マージ済み PR(30日)
145

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/codeql のほかの issue

github/codeql の issue をすべて見る

似ている issue

Build System の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。