[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024062005-subtype-collage-2c35@gregkh>
Date: Thu, 20 Jun 2024 10:45:58 +0200
From: Greg KH <greg@...ah.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: John Hubbard <jhubbard@...dia.com>, Miguel Ojeda <ojeda@...nel.org>,
Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...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@...sung.com>,
Alice Ryhl <aliceryhl@...gle.com>, linux-kbuild@...r.kernel.org,
rust-for-linux@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Makefile: rust-analyzer target: better error handling
and comments
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@...dia.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.
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
Powered by blists - more mailing lists