mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benno Lossin <benno.lossin@proton.me>
To: "Tamir Duberstein" <tamird@gmail.com>,
	"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>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>
Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] rust: pin_init_internal: fix rust-analyzer `mod quote`
Date: Thu, 20 Mar 2025 12:16:36 +0000	[thread overview]
Message-ID: <D8L34IUZGXWX.D2LSS2S2NAN7@proton.me> (raw)
In-Reply-To: <20250319-pin-init-internal-quote-v1-1-19de6a33a257@gmail.com>

On Thu Mar 20, 2025 at 2:35 AM CET, Tamir Duberstein wrote:
> Replace the `#[path]` attribute with a symlink to work around a
> limitation in rust-analyzer that requires all modules to belong to the
> same "source root". This allows code navigation from `pin_init_internal`
> to `quote` to work properly.
>
> Link: https://github.com/rust-lang/rust-analyzer/issues/3898
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
>  rust/pin-init/internal/src/lib.rs   | 1 -
>  rust/pin-init/internal/src/quote.rs | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rust/pin-init/internal/src/lib.rs b/rust/pin-init/internal/src/lib.rs
> index babe5e878550..fdd95afe3864 100644
> --- a/rust/pin-init/internal/src/lib.rs
> +++ b/rust/pin-init/internal/src/lib.rs
> @@ -20,7 +20,6 @@
>  use proc_macro::TokenStream;
>  
>  #[cfg(kernel)]
> -#[path = "../../../macros/quote.rs"]
>  #[macro_use]
>  mod quote;
>  #[cfg(not(kernel))]
> diff --git a/rust/pin-init/internal/src/quote.rs b/rust/pin-init/internal/src/quote.rs
> new file mode 120000
> index 000000000000..27a213d1a6ba
> --- /dev/null
> +++ b/rust/pin-init/internal/src/quote.rs
> @@ -0,0 +1 @@
> +../../../macros/quote.rs
> \ No newline at end of file
>
> ---
> base-commit: ff7f9b199e3f4cc7d61df5a9a26a7cbb5c1492e6
> change-id: 20250319-pin-init-internal-quote-b7e15e9e8233
>
> Best regards,

I'd rather not have this change, since this will introduce a dangling
symlink upstream [1].

[1]: https://github.com/rust-for-Linux/pin-init

---
Cheers,
Benno


  parent reply	other threads:[~2025-03-20 12:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  1:35 Tamir Duberstein
2025-03-20  7:46 ` Alice Ryhl
2025-03-20 10:16   ` Tamir Duberstein
2025-03-20 12:16 ` Benno Lossin [this message]
2025-03-20 13:31   ` Tamir Duberstein
2025-03-20 14:10     ` Benno Lossin
2025-03-20 14:15       ` Tamir Duberstein
2025-12-22 12:43         ` Tamir Duberstein
2025-12-23  1:32           ` Benno Lossin

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=D8L34IUZGXWX.D2LSS2S2NAN7@proton.me \
    --to=benno.lossin@proton.me \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@gmail.com \
    --cc=tmgross@umich.edu \
    /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®