[PATCH 2/2] scripts: generate_rust_analyzer.py: add uapi crate

Tamir Duberstein posted 2 patches 12 months ago
There is a newer version of this series
[PATCH 2/2] scripts: generate_rust_analyzer.py: add uapi crate
Posted by Tamir Duberstein 12 months ago
Commit 4e1746656839 ("rust: uapi: Add UAPI crate") did not update
rust-analyzer to include the new crate.

Add the missing definition to improve the developer experience.

Fixes: 4e1746656839 ("rust: uapi: Add UAPI crate")
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
 scripts/generate_rust_analyzer.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 1f573d19cd99..ee4f01ada277 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -105,6 +105,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
         }
 
     append_crate_with_generated("bindings", ["core"])
+    append_crate_with_generated("uapi", ["core"])
     append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings"])
 
     def is_root_crate(build_file, target):

-- 
2.48.1
Re: [PATCH 2/2] scripts: generate_rust_analyzer.py: add uapi crate
Posted by Tamir Duberstein 12 months ago
On Mon, Feb 10, 2025 at 12:56 PM Tamir Duberstein <tamird@gmail.com> wrote:
>
> Commit 4e1746656839 ("rust: uapi: Add UAPI crate") did not update
> rust-analyzer to include the new crate.
>
> Add the missing definition to improve the developer experience.
>
> Fixes: 4e1746656839 ("rust: uapi: Add UAPI crate")
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
>  scripts/generate_rust_analyzer.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
> index 1f573d19cd99..ee4f01ada277 100755
> --- a/scripts/generate_rust_analyzer.py
> +++ b/scripts/generate_rust_analyzer.py
> @@ -105,6 +105,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
>          }
>
>      append_crate_with_generated("bindings", ["core"])
> +    append_crate_with_generated("uapi", ["core"])
>      append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings"])
>
>      def is_root_crate(build_file, target):
>
> --
> 2.48.1
>

Oops, missing core dependency on uapi.