lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJ-ks9nZCi+LHw1-RPpeFEqTe8DRPnj0c7+rc_vFDVPWak0KEA@mail.gmail.com>
Date: Thu, 17 Apr 2025 09:14:02 -0400
From: Tamir Duberstein <tamird@...il.com>
To: Trevor Gross <tmgross@...ch.edu>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...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@...nel.org>, 
	Alice Ryhl <aliceryhl@...gle.com>, Danilo Krummrich <dakr@...nel.org>, 
	Boris-Chengbiao Zhou <bobo1239@....de>, Kees Cook <kees@...nel.org>, Fiona Behrens <me@...enk.dev>, 
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Lukas Wirth <lukas.wirth@...rous-systems.com>, 
	Daniel Almeida <daniel.almeida@...labora.com>
Subject: Re: [PATCH v5 13/13] scripts: generate_rust_analyzer.py: use `cfg_groups`

On Thu, Apr 17, 2025 at 3:29 AM Trevor Gross <tmgross@...ch.edu> wrote:
>
> On Tue, Mar 25, 2025 at 3:07 PM Tamir Duberstein <tamird@...il.com> wrote:
> >
> > Declare common `cfg`s just once to reduce the size of rust-analyzer.json
> > from 30619 to 2624 lines.
> >
> > Link: https://github.com/rust-lang/rust-analyzer/commit/2607c09fddef36da0d6f0a84625db5e20a5ebde3
> > Reviewed-by: Daniel Almeida <daniel.almeida@...labora.com>
> > Tested-by: Daniel Almeida <daniel.almeida@...labora.com>
> > Signed-off-by: Tamir Duberstein <tamird@...il.com>
> > ---
> >  scripts/generate_rust_analyzer.py | 19 ++++++++++---------
> >  1 file changed, 10 insertions(+), 9 deletions(-)
>
> > @@ -76,6 +70,7 @@ def generate_crates(
> >              "root_module": str(root_module),
> >              "is_workspace_member": is_workspace_member,
> >              "deps": deps,
> > +            "cfg_groups": cfg_groups if is_workspace_member else [],
>
> Does r-a just expect cfg_groups for workspace members or is there
> logic here? Maybe worth a comment.

r-a doesn't have opinions, but our configs apply only to our crates as
opposed to sysroot crates. That's not entirely true for core, but the
configs we apply there are narrow, whereas our workspace crates get
all of KConfig, which is huge.

I'll add a comment.

> Reviewed-by: Trevor Gross <tmgross@...ch.edu>

Thanks for the reviews! I need to rebase on rust-fixes which picked up
the ffi crate anyway, so I picked up your suggestions:
- generators instead of `map`.
- `Pathlib.path.stem`.
- `Pathlib.path.read_text`.
- Add a comment about cfg_groups.

Cheers.

Tamir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ