linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: "Björn Roy Baron" <bjorn3_gh@protonmail.com>
Cc: Vinay Varma <varmavinaym@gmail.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Miguel Ojeda <ojeda@kernel.org>,
	Alex Gaynor <alex.gaynor@gmail.com>,
	Wedson Almeida Filho <wedsonaf@gmail.com>,
	Boqun Feng <boqun.feng@gmail.com>, Gary Guo <gary@garyguo.net>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] scripts: `make rust-analyzer` for out-of-tree modules
Date: Fri, 20 Jan 2023 14:35:30 +0100	[thread overview]
Message-ID: <CANiq72k4cOEOykgUhgqaXPC7xhX2EoC8c4sr1oFEhKMfEdi=wA@mail.gmail.com> (raw)
In-Reply-To: <MzQKRFS7tVFtse-EaI1QkIlyz1NMk56vSPdOmY0M3sgG4RHsFUMubaEffsPxSDyFG9dKfhJcBxN4pYYf3R95IuAVd1Ne0P2pMqXHC0dOTLw=@protonmail.com>

On Fri, Jan 20, 2023 at 2:17 PM Björn Roy Baron
<bjorn3_gh@protonmail.com> wrote:
>
> I tested this with https://github.com/Rust-for-Linux/rust-out-of-tree-module using "make -C ../rust-for-linux M=$(pwd) rust-analyzer". It produces a rust-project.json file, however it misses the actual rust_out_of_tree crate. This is due to the fact that generate_rust_analyzer.py only checks Makefile to find the crate roots, but rust-out-of-tree-module defines it in Kbuild instead.

Thanks for testing it! Indeed, we should support out-of-tree modules
using the `Kbuild` + `Makefile` approach.

Having said that, I wonder if we should even attempt to perform the
search for out-of-tree modules. The search loop is a simple hack which
works fine for in-tree code because we know the structure of the code
around us, but we cannot for out-of-tree modules. For instance, they
may be using a different build system, or not mentioning the object
file, etc.

Perhaps we should simply ask them to give us the roots directly as a
list of arguments to the script or similar.

Cheers,
Miguel

  reply	other threads:[~2023-01-20 13:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 16:02 [PATCH] scripts: `make rust-analyzer` for out-of-tree modules Vinay Varma
2023-01-19 19:12 ` Miguel Ojeda
2023-01-20 13:17 ` Björn Roy Baron
2023-01-20 13:35   ` Miguel Ojeda [this message]
2023-01-21  5:25     ` [PATCH v2] " Vinay Varma
2023-01-21  9:18       ` Masahiro Yamada
2023-03-07 15:28         ` Vinay Varma
2023-03-07 19:55           ` Miguel Ojeda
2023-04-07 23:59             ` Miguel Ojeda
2023-04-11  9:17               ` [PATCH v5] " Vinay Varma
2023-08-02 17:37                 ` Miguel Ojeda
2023-01-21 16:40       ` [PATCH v2] " Björn Roy Baron
2023-03-07 12:24       ` Miguel Ojeda
2023-03-07 14:42         ` [PATCH v3] " Vinay Varma
2023-03-07 15:55           ` [PATCH v4] " Vinay Varma
2023-01-20 15:21 ` [PATCH] " Alice Ferrazzi

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='CANiq72k4cOEOykgUhgqaXPC7xhX2EoC8c4sr1oFEhKMfEdi=wA@mail.gmail.com' \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=ndesaulniers@google.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=varmavinaym@gmail.com \
    --cc=wedsonaf@gmail.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;
as well as URLs for NNTP newsgroup(s).