From: John Hubbard <jhubbard@nvidia.com>
To: Greg KH <greg@kroah.com>, Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nicolas@fjasle.eu>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Wedson Almeida Filho" <wedsonaf@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@samsung.com>,
"Alice Ryhl" <aliceryhl@google.com>,
linux-kbuild@vger.kernel.org, rust-for-linux@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Makefile: rust-analyzer target: better error handling and comments
Date: Thu, 20 Jun 2024 13:27:35 -0700 [thread overview]
Message-ID: <ac99b0da-7019-46b8-ab0f-5f4e08755d90@nvidia.com> (raw)
In-Reply-To: <2024062005-subtype-collage-2c35@gregkh>
On 6/20/24 1:45 AM, Greg KH wrote:
> On Thu, Jun 20, 2024 at 10:31:53AM +0200, Miguel Ojeda wrote:
>> On Thu, Jun 20, 2024 at 8:13 AM John Hubbard <jhubbard@nvidia.com> wrote:
>>>
>>> What exactly did you have in mind for how that should look? The
>>> "make rustavailable" target has some leading *** and some bare
>>> statements, so I'm not quite sure exactly how to lay it out:
>>
>> I was thinking something like:
>>
>> ***
>> *** Rust is not available.
>> ***
>>
>> (the `***` prefix is used also in other similar scripts and by Make itself).
>>
>> However, thinking about it a bit more, we should perhaps just let
>> `rust_is_available.sh` tell the user why it fails, since it is likely
>> the next step the user would do anyway:
>>
>> $ make LLVM=1 rust-analyzer
>> ***
>> *** Rust compiler 'rustc' is too old.
>> *** Your version: 1.62.0
>> *** Minimum version: 1.78.0
>> ***
>> ***
>> *** Please see Documentation/rust/quick-start.rst for details
>> *** on how to set up the Rust support.
>> ***
>> make[1]: *** [linux/Makefile:1973: rust-analyzer] Error 1
>> make: *** [Makefile:240: __sub-make] Error 2
>>
>> What do you think? Then there is no need for extra output here and the
>> patch becomes simpler too.
Yes, that's perfect, actually.
> As someone who just ran into the "wait, how do I get rust to build on
> this machine again?" problem, yes, having the link to the documentation
> right there would be helpful. I did know where to find it, but others
> might not, and it's free to add.
>
> thanks,
>
> greg k-h
Right, we get this for free by just letting scripts/rust_is_available.sh
report its results "out loud".
I'll post a v2, and with the comment part split into a separate patch as
requested.
thanks,
--
John Hubbard
NVIDIA
prev parent reply other threads:[~2024-06-20 20:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-01 0:48 [PATCH] Makefile: rust-analyzer target: better error handling and comments John Hubbard
2024-06-14 9:00 ` Alice Ryhl
2024-06-19 12:25 ` Miguel Ojeda
2024-06-20 6:12 ` John Hubbard
2024-06-20 8:31 ` Miguel Ojeda
2024-06-20 8:45 ` Greg KH
2024-06-20 20:27 ` John Hubbard [this message]
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=ac99b0da-7019-46b8-ab0f-5f4e08755d90@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=greg@kroah.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--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