[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ-ks9nkY7za5zQLv7YkvCeJ1BQ70ZnTTP3Q4VNAmMaG3sGu+Q@mail.gmail.com>
Date: Sun, 9 Feb 2025 11:24:20 -0500
From: Tamir Duberstein <tamird@...il.com>
To: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Boris-Chengbiao Zhou <bobo1239@....de>, Fiona Behrens <me@...enk.dev>, Kees Cook <kees@...nel.org>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
Chayim Refael Friedman <chayimfr@...il.com>
Subject: Re: [PATCH] scripts: generate_rust_analyzer.py: add missing macros ->
core dep
[-cc Wedson Almeida Filho <wedsonaf@...gle.com>, retired email]
Actually macros depends on std and proc_macro rather than core.
On Sun, Feb 9, 2025 at 10:29 AM Tamir Duberstein <tamird@...il.com> wrote:
>
> The macros crate has depended on core since its introduction in commit
> 1fbde52bde73 ("rust: add `macros` crate"). This dependency was omitted from
> commit 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`") resulting in
> false-positive warnings emitted from rust-analyzer such as:
>
> [{
> "resource": "/Users/tamird/src/linux/rust/macros/module.rs",
> "owner": "_generated_diagnostic_collection_name_#1",
> "code": {
> "value": "non_snake_case",
> "target": {
> "$mid": 1,
> "path": "/rustc/",
> "scheme": "https",
> "authority": "doc.rust-lang.org",
> "query": "search=non_snake_case"
> }
> },
> "severity": 4,
> "message": "Variable `None` should have snake_case name, e.g. `none`",
> "source": "rust-analyzer",
> "startLineNumber": 123,
> "startColumn": 17,
> "endLineNumber": 123,
> "endColumn": 21
> }]
>
> Add the missing dependency to improve the developer experience.
>
> Fixes: 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`")
> Suggested-by: Chayim Refael Friedman <chayimfr@...il.com>
> Signed-off-by: Tamir Duberstein <tamird@...il.com>
> ---
> scripts/generate_rust_analyzer.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
> index aa8ea1a4dbe5..8f99af38dd09 100755
> --- a/scripts/generate_rust_analyzer.py
> +++ b/scripts/generate_rust_analyzer.py
> @@ -75,7 +75,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
> append_crate(
> "macros",
> srctree / "rust" / "macros" / "lib.rs",
> - [],
> + ["core"],
> is_proc_macro=True,
> )
>
>
> ---
> base-commit: 6273a058383e05465083b535ed9469f2c8a48321
> change-id: 20250209-rust-analyzer-macros-core-dep-0f57868dd19f
>
> Best regards,
> --
> Tamir Duberstein <tamird@...il.com>
>
Powered by blists - more mailing lists