On Mon, Jul 18, 2022 at 6:08 PM Neal Gompa <ngompa13(a)gmail.com> wrote:
On Mon, Jul 18, 2022 at 12:03 PM Miro HronĨok <mhroncok(a)redhat.com> wrote:
>
> On 17. 07. 22 17:34, Fabio Valentini wrote:
> > My PR to split core functionality from the things that need
> > third-party python packages has been merged:
> >
https://pagure.io/fedora-rust/rust2rpm/pull-request/204
> >
> > Once this is released as part of rust2rpm v22, we can adapt the
> > packaging so that cargo-inspector will no longer pull in any
> > third-party python packages, as it now only needs the python3
> > interpreter and only imports things from the python standard library.
> >
> > I don't think we can get rid of the python3 interpreter dependency,
> > unless we rewrite the RPM dependency generator bits (cargo-inspector)
> > in some other language.
>
> That's quite understandable. Could it be written in Rust? Not a priority, just
> curious.
I mean, it *could* be rewritten in Rust. The project isn't that big.
And doing that would also let us reuse the same SemVer parsing
libraries that are used by cargo instead of using a custom
reimplementation in Python.
However, it would probably introduce a bootstrap problem for the Rust
stack (i.e. because the dependency generator for Rust crates now is
itself a Rust crate).
So we'd probably need to keep the Python version around, as well.
By all means, it does! Thank you.
Great! I'm looking forward to the rust2rpm v22 release, it will bring
lots of quality-of-life improvements for Rust packagers, as well as
this dependency pruning.
I'd rather it not be written in Rust. That would make a number
of
things too complicated, and Rust is a lot less accessible for people
to contribute to.
Not sure if I agree with that. cargo-inspector is a tool that's used
exclusively by Rust RPM packaging macros, so we already require
contributors to use a different language (Python) that is, for all
intents and purposes, unrelated to both RPM macros and Rust. You could
make the argument that more people know how to write Python than know
how to write Rust, but maybe people who don't know how to write Rust
code shouldn't package Rust crates or make changes to Rust packaging
tools, in the first place? :)
Fabio