* [PATCH v3 0/2] Makefile: rust-analyzer better error handling, documentation
@ 2024-06-28 0:43 John Hubbard
2024-06-28 0:43 ` [PATCH v3 1/2] Makefile: rust-analyzer target: better error handling John Hubbard
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: John Hubbard @ 2024-06-28 0:43 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Greg KH, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
Alex Gaynor, Wedson Almeida Filho, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Finn Behrens, linux-kbuild, rust-for-linux, LKML, John Hubbard
Changes since v2:
1) Used wording suggested by Miguel Ojeda (thanks!) for the
documentation patch.
2) Added review, testing, ack tags.
Finn Behrens, thanks for your reviews, and please note that out of an
excess of caution, I've only applied your reviewed-by tag to patch 2/2.
For patch 1/2, the wording changed a lot after you reviewed it, so I
couldn't quite convince myself that the review was still fair to claim.
Changes since v1:
1) Thanks to Alice Ryhl for testing and reviewing v1. I had to drop both
of those tags for this v2, because even though it is small, it's
different enough to invalidate both, unfortunately.
2) Adopted Miguel Ojeda's suggestion of letting rust_is_available.sh
report its results directly, thus improving the output, while also
simplifying the patch.
3) As requested by Miguel, split out some new comment documentation
for the rust-analyzer target into its own patch.
John Hubbard (2):
Makefile: rust-analyzer target: better error handling
Makefile: improve comment documentation for the rust-analyzer target
Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
base-commit: 6d6444ba82053c716fb5ac83346202659023044e
--
2.45.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/2] Makefile: rust-analyzer target: better error handling
2024-06-28 0:43 [PATCH v3 0/2] Makefile: rust-analyzer better error handling, documentation John Hubbard
@ 2024-06-28 0:43 ` John Hubbard
2024-06-28 0:43 ` [PATCH v3 2/2] Makefile: improve comment documentation for the rust-analyzer target John Hubbard
2024-07-09 8:00 ` [PATCH v3 0/2] Makefile: rust-analyzer better error handling, documentation Miguel Ojeda
2 siblings, 0 replies; 6+ messages in thread
From: John Hubbard @ 2024-06-28 0:43 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Greg KH, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
Alex Gaynor, Wedson Almeida Filho, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Finn Behrens, linux-kbuild, rust-for-linux, LKML, John Hubbard
1) Provide a better error message for the "Rust not available" case.
Without this patch, one gets various misleading messages, such as:
"No rule to make target 'rust-analyzer'"
Instead, run scripts/rust_is_available.sh directly, as a prerequisite,
and let that script report the cause of any problems, as well as
providing a link to the documentation. Thanks to Miguel Ojeda for the
idea of just letting rust_is_available.sh report its results directly.
The new output in the failure case looks like this:
$ make rust-analyzer
***
*** Rust compiler 'rustc' could not be found.
***
***
*** Please see Documentation/rust/quick-start.rst for details
*** on how to set up the Rust support.
***
make[1]: *** [/kernel_work/linux-github/Makefile:1975: rust-analyzer] Error 1
make: *** [Makefile:240: __sub-make] Error 2
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Finn Behrens <me@kloenk.dev>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Tested-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 4d36f943b3b1..204e9be0e010 100644
--- a/Makefile
+++ b/Makefile
@@ -1970,6 +1970,7 @@ tags TAGS cscope gtags: FORCE
# IDE support targets
PHONY += rust-analyzer
rust-analyzer:
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh
$(Q)$(MAKE) $(build)=rust $@
# Script to generate missing namespace dependencies
--
2.45.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] Makefile: improve comment documentation for the rust-analyzer target
2024-06-28 0:43 [PATCH v3 0/2] Makefile: rust-analyzer better error handling, documentation John Hubbard
2024-06-28 0:43 ` [PATCH v3 1/2] Makefile: rust-analyzer target: better error handling John Hubbard
@ 2024-06-28 0:43 ` John Hubbard
2024-06-28 8:55 ` Alice Ryhl
2024-06-28 19:05 ` Finn Behrens
2024-07-09 8:00 ` [PATCH v3 0/2] Makefile: rust-analyzer better error handling, documentation Miguel Ojeda
2 siblings, 2 replies; 6+ messages in thread
From: John Hubbard @ 2024-06-28 0:43 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Greg KH, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
Alex Gaynor, Wedson Almeida Filho, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Finn Behrens, linux-kbuild, rust-for-linux, LKML, John Hubbard
Replace the cryptic phrase ("IDE support targets") that initially
appears to be about how to support old hard drives, with a few sentences
that explain what "make rust-analyzer" provides.
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Finn Behrens <me@kloenk.dev>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 204e9be0e010..7db597bdb09d 100644
--- a/Makefile
+++ b/Makefile
@@ -1967,7 +1967,9 @@ quiet_cmd_tags = GEN $@
tags TAGS cscope gtags: FORCE
$(call cmd,tags)
-# IDE support targets
+# Generate rust-project.json (a file that describes the structure of non-Cargo
+# Rust projects) for rust-analyzer (an implementation of the Language Server
+# Protocol).
PHONY += rust-analyzer
rust-analyzer:
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh
--
2.45.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] Makefile: improve comment documentation for the rust-analyzer target
2024-06-28 0:43 ` [PATCH v3 2/2] Makefile: improve comment documentation for the rust-analyzer target John Hubbard
@ 2024-06-28 8:55 ` Alice Ryhl
2024-06-28 19:05 ` Finn Behrens
1 sibling, 0 replies; 6+ messages in thread
From: Alice Ryhl @ 2024-06-28 8:55 UTC (permalink / raw)
To: John Hubbard
Cc: Miguel Ojeda, Greg KH, Masahiro Yamada, Nathan Chancellor,
Nicolas Schier, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Finn Behrens, linux-kbuild, rust-for-linux, LKML
On Fri, Jun 28, 2024 at 2:44 AM John Hubbard <jhubbard@nvidia.com> wrote:
>
> Replace the cryptic phrase ("IDE support targets") that initially
> appears to be about how to support old hard drives, with a few sentences
> that explain what "make rust-analyzer" provides.
>
> Cc: Alice Ryhl <aliceryhl@google.com>
> Cc: Finn Behrens <me@kloenk.dev>
> Acked-by: Miguel Ojeda <ojeda@kernel.org>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] Makefile: improve comment documentation for the rust-analyzer target
2024-06-28 0:43 ` [PATCH v3 2/2] Makefile: improve comment documentation for the rust-analyzer target John Hubbard
2024-06-28 8:55 ` Alice Ryhl
@ 2024-06-28 19:05 ` Finn Behrens
1 sibling, 0 replies; 6+ messages in thread
From: Finn Behrens @ 2024-06-28 19:05 UTC (permalink / raw)
To: John Hubbard
Cc: Miguel Ojeda, Greg KH, Masahiro Yamada, Nathan Chancellor,
Nicolas Schier, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, linux-kbuild, rust-for-linux, LKML
On 28 Jun 2024, at 2:43, John Hubbard wrote:
> Replace the cryptic phrase ("IDE support targets") that initially
> appears to be about how to support old hard drives, with a few sentences
> that explain what "make rust-analyzer" provides.
>
> Cc: Alice Ryhl <aliceryhl@google.com>
> Cc: Finn Behrens <me@kloenk.dev>
> Acked-by: Miguel Ojeda <ojeda@kernel.org>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Finn Behrens <me@kloenk.dev>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/2] Makefile: rust-analyzer better error handling, documentation
2024-06-28 0:43 [PATCH v3 0/2] Makefile: rust-analyzer better error handling, documentation John Hubbard
2024-06-28 0:43 ` [PATCH v3 1/2] Makefile: rust-analyzer target: better error handling John Hubbard
2024-06-28 0:43 ` [PATCH v3 2/2] Makefile: improve comment documentation for the rust-analyzer target John Hubbard
@ 2024-07-09 8:00 ` Miguel Ojeda
2 siblings, 0 replies; 6+ messages in thread
From: Miguel Ojeda @ 2024-07-09 8:00 UTC (permalink / raw)
To: John Hubbard
Cc: Miguel Ojeda, Greg KH, Masahiro Yamada, Nathan Chancellor,
Nicolas Schier, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, Finn Behrens, linux-kbuild, rust-for-linux, LKML
On Fri, Jun 28, 2024 at 2:44 AM John Hubbard <jhubbard@nvidia.com> wrote:
>
> Changes since v2:
>
> 1) Used wording suggested by Miguel Ojeda (thanks!) for the
> documentation patch.
>
> 2) Added review, testing, ack tags.
>
> Finn Behrens, thanks for your reviews, and please note that out of an
> excess of caution, I've only applied your reviewed-by tag to patch 2/2.
> For patch 1/2, the wording changed a lot after you reviewed it, so I
> couldn't quite convince myself that the review was still fair to claim.
Applied to `rust-next` -- thanks!
[ Reworded title. - Miguel ]
Cheers,
Miguel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-07-09 8:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28 0:43 [PATCH v3 0/2] Makefile: rust-analyzer better error handling, documentation John Hubbard
2024-06-28 0:43 ` [PATCH v3 1/2] Makefile: rust-analyzer target: better error handling John Hubbard
2024-06-28 0:43 ` [PATCH v3 2/2] Makefile: improve comment documentation for the rust-analyzer target John Hubbard
2024-06-28 8:55 ` Alice Ryhl
2024-06-28 19:05 ` Finn Behrens
2024-07-09 8:00 ` [PATCH v3 0/2] Makefile: rust-analyzer better error handling, documentation Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox