[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72n=mFF5+MxAmOwNS+ZOGo=H199MX_5nPiZTKchFK+Gn6g@mail.gmail.com>
Date: Thu, 20 Jun 2024 10:31:53 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: John Hubbard <jhubbard@...dia.com>
Cc: 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 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.
The bare statement we have there for the successful case was mainly so
that the explicit `make rustavailable` did not look empty if there was
no issue, i.e. we don't print anything extra when there is an error
(and if we wanted to print something for the failure case, then we
should probably do it in the script, rather than here).
Cheers,
Miguel
Powered by blists - more mailing lists