From: wolf <wolf@wolfsden.cz>
To: Wojtek Kosior <koszko@koszko.org>
Cc: Paul Collignan <paul.collignan@aquilenet.fr>, help-guix@gnu.org
Subject: Re: Packaging a rust program with a lot of crates
Date: Mon, 17 Jul 2023 18:05:00 +0200 [thread overview]
Message-ID: <ZLVmrCkREo6u6LyI@ws> (raw)
In-Reply-To: <20230715160656.0120f6d4.koszko@koszko.org>
[-- Attachment #1: Type: text/plain, Size: 4108 bytes --]
On 2023-07-15 16:06:56 +0200, Wojtek Kosior via wrote:
> Hi Paul!
>
> > I'm not a computer scientist at all. At best you could call me a
> > GNU/Linux end user for some time, but only to consume, never to
> > produce. I would like to contribute a little, and for that I want to
> > start with guix.
>
> That's cool! Please keep in mind, tho that Guix is not an "easy" distro
> for novice users. Be ready to spend even more time learning stuff :)
>
> Having that said, the facilities Guix provides do allow for packages to
> be created and maintained with relatively little time effort. I'm sure
> learning will pay off!
>
> > I would like to package a program that I use on my computer but which
> > is not in the repositories. It turns out to be a program written in
> > Rust, with lots of dependencies. If I were to copy/paste all of what
> > guix import -r returns the patch would be over 3000 lines long.
> >
> > I would like to know what are the best practices to adopt in this
> > case. There are simple additions, updates, and additions with
> > inheritance. I guess I shouldn't send a patch with all of this mixed
> > up.
>
> I'm also a novice when it comes to sending to guix-patches but I
> believe the perfect approach in this case would be to:
> - add each package with a separate git commit
> - make sure the final package builds and works properly on your PC
> - create a patch series comprising all the additions with `git
> format-patch` as described in the documentation
> - describe in general what you did in series' cover letter that `git
> format-patch` generated for you
> - send the cover letter to guix-patches mailing list with `git
> send-email` as described in the documentation; this will cause the
> debbugs instance to open a new bug
> - wait for an email response from debbugs with your new bug's number
> - send the rest of your patch series with one invokation of `git
> send-email --to=<BUG_NUMBER>@debbugs.gnu.org` as described in the
> documentation
>
> This way the Guix committers will see all the package additions as
> separate patches but grouped together in one debbugs issue. There's no
> need to wait for one patch to be accepted before sending another in
> this case.
>
> > Also, in this kind of case, I think that adding the program will take
> > weeks when you're a beginner like me. Did I miss something? For
> > example, is it possible to automate package inheritance during an
> > update to a major version of a crate, or does it have to be done by
> > hand?
>
> I'm not sure what you mean by this question.
>
> Anyway, you just touched one unfortunate truth — when you're a
> beginner, any serious task can easily take weeks.
>
> My suggestion is that you start with something easier first. Perhaps an
> application that only has 1 or 2 dependencies?
>
> > Last question, for my culture, is there a plan to "clean up" old
> > packages and dependencies that are no longer used, or will the scm
> > files grow indefinitely?
>
> There might be some misunderstanding here. Guix does allow
> 1. for multiple versions of the same package to coexist
> 2. and for multiple versions of the same package to share most of the
> packaging code via inheritance.
> However, the possibility 1. is only exercised for some strategic
> packages like gcc. For casual packages, when upstream releases a new
> version, some kind Guix contributor sends a patch that changes the
> definition in the .scm file to now describe the new version. The old
> version need not be explicitly deleted — its place is taken by the new
> version :)
Is there a way to mark a package as a dependency? I can very well imagine that
new version of some golang program would require less dependencies, but it is
very easy to forget to remove the package definition. Is there a reasonable way
to clean this up?
>
> Good luck and happy hacking ^^
> Wojtek
W.
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2023-07-17 16:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 14:24 Packaging a rust program with a lot of crates Paul Collignan
2023-07-15 14:06 ` Wojtek Kosior via
2023-07-15 15:10 ` Paul Collignan
2023-07-15 16:16 ` Wojtek Kosior via
2023-07-23 12:46 ` Hartmut Goebel
2023-07-17 16:05 ` wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZLVmrCkREo6u6LyI@ws \
--to=wolf@wolfsden.cz \
--cc=help-guix@gnu.org \
--cc=koszko@koszko.org \
--cc=paul.collignan@aquilenet.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).