Skip to content

Rust: Improvements to the rust-analyzer update workflow - #22769

Merged
paldepind merged 3 commits into
mainfrom
rust/update-workflow
Oct 8, 2026
Merged

paldepind merged 3 commits into
mainfrom
rust/update-workflow

Conversation

@paldepind

@paldepind paldepind commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Two minor fixes to the rust-analyzer update script:

  • Ensure that the codeql CLI is available in the workflow
  • Fix a problem where we assumed that the release date of a rust-analyzer crate would match a git tag exactly.

Previously we assumed that the release date of a rust-analyzer crate would match a git tag. However, these dates may not line up exactly which we now handle.
@github-actions github-actions Bot added the Rust Pull requests that update Rust code label Oct 7, 2026
@paldepind
paldepind marked this pull request as ready for review October 7, 2026 11:46
@paldepind
paldepind requested review from a team as code owners October 7, 2026 11:46
Copilot AI balanced review requested due to automatic review settings October 7, 2026 11:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The changes consistently address both documented workflow failures without introducing unresolved issues.

Review effort: Balanced
Findings: None

What changed in this PR

Improves rust-analyzer updates by resolving the appropriate release tag and ensuring CodeQL is available.

Changes:

  • Selects the latest compatible dated rust-analyzer tag, including suffixed tags.
  • Separates tag resolution, archive integrity calculation, and source updates.
  • Adds CodeQL setup to the generated workflow.
File Description
rust/​scripts/​update_rust_analyzer.py Resolves release tags and updates source/toolchain metadata.
.github/​workflows/​update-rust-analyzer.md Adds CodeQL setup.
.github/​workflows/​update-rust-analyzer.lock.yml Regenerates the compiled workflow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

andersfugmann
andersfugmann previously approved these changes Oct 8, 2026

@andersfugmann andersfugmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from one Nit (feel free to ignore) LGTM

def get_compatible_rust_toolchain(rust_analyzer_release_tag: str) -> str:
"""Get the latest Rust toolchain released no later than rust-analyzer."""
rust_analyzer_release = get_rust_analyzer_release_date(rust_analyzer_version)
rust_analyzer_release = rust_analyzer_release_tag[:10]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be helpful to comment exptected format of rust_analyzer_release_tag parameter to make it clear that the first 10 chars is a date on the form YYYY-MM-DD

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Done.

@andersfugmann andersfugmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paldepind
paldepind merged commit e785768 into main Oct 8, 2026
9 of 13 checks passed
@paldepind
paldepind deleted the rust/update-workflow branch October 8, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants