lkml.org 
[lkml]   [2023]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] scripts: rust-analyzer: Skip crate module directories
On Tue, Mar 7, 2023 at 1:08 PM Andreas Hindborg <nmi@metaspace.dk> wrote:
>
> When generating rust-analyzer configuration, skip module directories.

This is https://github.com/Rust-for-Linux/linux/pull/883, also handled
by Vinay's patch
https://lore.kernel.org/rust-for-linux/20230118160220.776302-1-varmavinaym@gmail.com/.

Lina's approach is arguably a bit more idiomatic in Python in that it
is usually encouraged to follow the "Easier to ask for forgiveness
than permission" approach.

Lina, would you like to submit yours? Or do you prefer a `Link: ` /
`Reported-by: ` / `Co-developed-by: ` here?

> If `driver_mod` is a module of the crate `driver`, the directory `driver_mod`
> may not contain `Makefile`, and `generate_rust_analyzer.py` will fail.

By the way, note that in the kernel crate we are avoiding `mod.rs`
files, instead using `name.rs` in the parent folder, in other to make
it easier to find the files. I will add a note about it in the docs.

Cheers,
Miguel

\
 
 \ /
  Last update: 2023-03-27 00:47    [W:0.182 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site