Skip to content

Rust: Pass --ignore-rust-version to Cargo - #22814

Merged
paldepind merged 1 commit into
mainfrom
rust/ignore-toolchain-version
Oct 14, 2026
Merged

paldepind merged 1 commit into
mainfrom
rust/ignore-toolchain-version

Conversation

@paldepind

@paldepind paldepind commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Pass --ignore-rust-version to Cargo. The comment should explain why this makes sense.

Closes #22793.

Comment thread unified/ql/lib/codeql/unified/internal/Ast.qll Fixed
@paldepind
paldepind force-pushed the rust/ignore-toolchain-version branch from 626fa3d to d38a237 Compare October 13, 2026 12:27
@github-actions github-actions Bot added the Rust Pull requests that update Rust code label Oct 13, 2026
@paldepind
paldepind marked this pull request as ready for review October 13, 2026 12:40
@paldepind
paldepind requested review from a team as code owners October 13, 2026 12:40
Copilot AI balanced review requested due to automatic review settings October 13, 2026 12:40

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.

🟡 Changes recommended

The explanatory comment incorrectly limits the remaining failure modes to rust-analyzer compatibility.

1 open finding
What changed in this PR

Adds Cargo’s --ignore-rust-version flag when configuring rust-analyzer.

Changes:

  • Appends the flag while avoiding duplicates.
  • Documents why version checks are bypassed.
File Description
rust/​extractor/​src/​config.rs Adds the Cargo argument during configuration.

🧠 Review effort: Balanced


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

Comment thread rust/extractor/src/config.rs Outdated
Comment on lines +195 to +196
// version is ignored. With this failures will only occur if the project actually uses Rust
// features that rust-analyzer can't understand (which is the best we can hope for).
andersfugmann
andersfugmann previously approved these changes Oct 13, 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.

LGTM. How do we monitor the effect of this - i.e. how would we know if this cases problems for customers? Dovwe have a dashboard that can inform us?

@paldepind

Copy link
Copy Markdown
Contributor Author

How do we monitor the effect of this - i.e. how would we know if this cases problems for customers? Dovwe have a dashboard that can inform us?

  • For this change specifically I'm not worried. This should only have an affect when a project's specified toolchain is above our fixed toolchain. In that case it turns a certain error into what is a pretty good chance of success.

  • I think Rust: Update rust-analyzer to 0.0.347 and pin toolchain #22493 was in fact the change where monitoring was more important, as that's the more significant change.

  • All dashboards that show data that indicates extraction performance should be useful to monitor the impact of this. I think you know better than me what we have in that regard. We have a graph with "Resolved function calls" which is pretty stable.

@paldepind

paldepind commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Nothing to see in the DCA report, which is what we expected. Ready for re-approval after I force pushed a small tweak to the comment.

@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 449d672 into main Oct 14, 2026
21 checks passed
@paldepind
paldepind deleted the rust/ignore-toolchain-version branch October 14, 2026 08:48
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.

Rust: extraction succeeds with missing proc-macro output when the project's rust-version exceeds the forced toolchain

4 participants