mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tamir Duberstein <tamird@gmail.com>
To: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Boris-Chengbiao Zhou" <bobo1239@web.de>,
	"Fiona Behrens" <me@kloenk.dev>, "Kees Cook" <kees@kernel.org>
Cc: Wedson Almeida Filho <wedsonaf@google.com>,
	 rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Chayim Refael Friedman <chayimfr@gmail.com>,
	 Tamir Duberstein <tamird@gmail.com>
Subject: [PATCH] scripts: generate_rust_analyzer.py: add missing macros -> core dep
Date: Sun, 09 Feb 2025 10:29:29 -0500	[thread overview]
Message-ID: <20250209-rust-analyzer-macros-core-dep-v1-1-5ebeb3eb60a9@gmail.com> (raw)

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@gmail.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.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@gmail.com>


             reply	other threads:[~2025-02-09 15:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09 15:29 Tamir Duberstein [this message]
2025-02-09 16:24 ` Tamir Duberstein
2025-02-09 16:29 ` Miguel Ojeda
2025-02-09 16:39   ` Tamir Duberstein
2025-02-09 16:43     ` Miguel Ojeda
2025-02-09 16:48       ` Tamir Duberstein
2025-02-09 17:05         ` Miguel Ojeda
2025-02-09 17:08           ` Tamir Duberstein
2025-02-09 17:21             ` Miguel Ojeda
2025-02-09 17:01     ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250209-rust-analyzer-macros-core-dep-v1-1-5ebeb3eb60a9@gmail.com \
    --to=tamird@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=bobo1239@web.de \
    --cc=boqun.feng@gmail.com \
    --cc=chayimfr@gmail.com \
    --cc=gary@garyguo.net \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@kloenk.dev \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=wedsonaf@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®