Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Rust: Update rust-analyzer to 0.0.352

Offen
#22,660 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
github-actions, rust

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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 · ◷

Vorherrschende Sprache
CodeQL
Sterne
10.1k
Forks
2.1k
Ø Merge
2 T. 17 Std.
Gemergte PRs (30 T.)
145

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/codeql

Alle Issues in github/codeql

Ähnliche Issues

Weitere Issues zu Build System

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.