Re: [PATCH] gpu: nova: fix rust-analyzer generation

"Alexandre Courbot" <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On Wed Jul 1, 2026 at 9:36 PM JST, Onur Özkan wrote:
> On Wed, 01 Jul 2026 15:40:51 +0900
> Alexandre Courbot <[email protected]> wrote:
>
>> The rust-analyzer generator script recognizes a crate when its
>> corresponding `.o` appears in the Rust source file's immediate `Makefile`
>> or `Kbuild` file.
>> 
>> Commit ca524e273c43 ("gpu: build nova-core and nova-drm from
>> drivers/gpu/Makefile") moves the build rules for `nova-core` and
>> `nova-drm` into `drivers/gpu/Makefile`, which results in the generator
>> script ignoring these crates.
>
> So this regression shows that generate_rust_analyzer.py should probably handle
> this case better e.g. by checking and understanding parent build rules too.

Ideally yes - I expect that this is something the improved build system
will handle correctly. The current Nova build rules are a temporary
workaround, so I wanted to keep this "fix" as small as possible as it
will also be reverted eventually.

>
>> 
>> Fix this by naming the crates' module as a comment in their respective
>> `Makefile`; this is enough for the script to pick them up and restore
>> `rust-analyzer` functionality on them.
>> 
>> Fixes: ca524e273c43 ("gpu: build nova-core and nova-drm from drivers/gpu/Makefile")
>> Signed-off-by: Alexandre Courbot <[email protected]>
>
> That said, this is a reasonable quick fix for the current generator as it fixes
> the rust-analyzer functionality for nova, so:
>
> Reviewed-by: Onur Özkan <[email protected]>

Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.