Skip to content

Rust: upgrade rust-analyzer to 0.0.274 - #19314

Closed
redsun82 wants to merge 21 commits into
mainfrom
redsun82/cargo-upgrade-2
Closed

Rust: upgrade rust-analyzer to 0.0.274#19314
redsun82 wants to merge 21 commits into
mainfrom
redsun82/cargo-upgrade-2

Conversation

@redsun82

@redsun82redsun82 commented Apr 15, 2025

Copy link
Copy Markdown
Contributor

An outline of included work:

  • adapting crate_graph.rs to the underlying unstable API changes
  • updating the rust toolchains, as rust-analyzer requires that.
  • new rust-analyzer does not expand macros in ASTs that are expanded by attribute macros. Some effort was put into:
    • avoiding spamming on macro expansion warnings in the context of an item that needs to be expanded as an attribute macro, by turning off macro expansion in such a context
    • from the implementation point of view, this was achieved by renaming the special emit_detached into a more generic post_emit, and adding a corresponding pre_emit: this allows to do the above in terms of the pre_emit/post_emit pair for Item
    • tweaking the bad constructor query to work with this (looking into the expanded function bodies rather than the unexpanded ones).

@github-actionsgithub-actionsBot added the Rust Pull requests that update Rust code label Apr 15, 2025
@redsun82
redsun82 marked this pull request as ready for review April 15, 2025 16:10
CopilotAI review requested due to automatic review settings April 15, 2025 16:10
@redsun82
redsun82 requested review from a team as code ownersApril 15, 2025 16:10

CopilotAI 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 reviewed 109 out of 129 changed files in this pull request and generated no comments.

Files not reviewed (20)
  • MODULE.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.android_system_properties-0.1.5.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.anstyle-wincon-3.0.7.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.anyhow-1.0.98.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.argfile-0.2.1.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.atomic-0.6.0.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.borsh-1.5.7.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bstr-1.12.0.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bumpalo-3.17.0.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bytemuck-1.22.0.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.byteorder-1.5.0.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.cc-1.2.19.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.chrono-0.4.40.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.clap-4.5.36.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.clap_builder-4.5.36.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.crossbeam-channel-0.5.15.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.darling-0.20.11.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.darling_core-0.20.11.bazel: Language not supported
  • misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.darling_macro-0.20.11.bazel: Language not supported

@redsun82
redsun82 requested a review from aibaarsApril 15, 2025 16:10
aibaars
aibaars previously approved these changes Apr 15, 2025
@aibaars
aibaarsforce-pushed the redsun82/cargo-upgrade-2 branch 2 times, most recently from a85de02 to 5b76400CompareApril 18, 2025 10:30
@redsun82
redsun82 requested review from aibaars and geoffw0May 19, 2025 12:19
Comment threadrust/ql/test/query-tests/security/CWE-696/test.rs
)
)
or
// callable -> callable attribute macro expansion

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.

Is this comment intended to be here?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

oh, whoops, this was in a previous version I had, let me fix that, thanks!

@redsun82
redsun82 requested a review from a team as a code ownerMay 19, 2025 15:23
@redsun82
redsun82force-pushed the redsun82/cargo-upgrade-2 branch from a615ba1 to 5ec72b2CompareMay 19, 2025 15:24

@geoffw0geoffw0 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.

QL changes (src and tests) LGTM. 👍

update: oh, wait the spurious comment hasn't been deleted yet.

@redsun82

Copy link
Copy Markdown
ContributorAuthor

QL changes (src and tests) LGTM. 👍

update: oh, wait the spurious comment hasn't been deleted yet.

sorry, I was sure I had done it

@geoffw0

Copy link
Copy Markdown
Contributor

Extractor changes still need reviewing. I can do it if you're desperate / fairly confident / willing to answer basic questions.

@redsun82

Copy link
Copy Markdown
ContributorAuthor

Extractor changes still need reviewing. I can do it if you're desperate / fairly confident / willing to answer basic questions.

At this point I would have you review the selected out commits in #19572

@redsun82
redsun82 marked this pull request as draft May 23, 2025 14:39
@redsun82
redsun82force-pushed the redsun82/cargo-upgrade-2 branch from a1b66ff to 9a0f5afCompareMay 26, 2025 10:36
@redsun82

Copy link
Copy Markdown
ContributorAuthor

obsoleted by #19524

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationRustPull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@redsun82@geoffw0@aibaars