From: Christina O'Donnell <cdo@mutix.org>
To: Sharlatan Hellseher <sharlatanus@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Golang mudules to follow common grouping
Date: Sat, 20 Jan 2024 19:49:53 +0000 [thread overview]
Message-ID: <f26a2d80-f064-53ab-b3a8-486f90df1bce@mutix.org> (raw)
In-Reply-To: <CAO+9K5qq3QXcKJJKSEjNj5skwXhXhSOpzvGvDzR9fezOq=XbNA@mail.gmail.com>
Hi Oleg,
> I've added comments in commentary section in the top of the file
asking to
> keep packages alphabetically sorted seen in julia-xyz.scm as well.
> python-*.scm ordered semi random grouped closer to package purpose which
> require more thinking where to put a new one :-)
Ah, I suppose it isn't that important given you can grep for the right
package.
> Good point her, I did manual split, with Emacs keyboard macros, magit
history
> scan for copyright lines and manual check where package was used to
include
> new module name.
>
> The split into golang-crypto is in review now and there would be 2
more common
> grouping: golang-compression and golang-build (or golang-extension). Rest
> packages which are hard to determine a group wound go to generic
golang-xyz
> sorted alphabetically.
Hmm, there seems to be a limit in the degree of parallelizability in this
process unfortunately. But if there's anything you can think of that
could help
(manually) in this effort, then I'd be happy to help!
> Let me know your tooling which you familiar with I might think
> about some sort of automation.
I've had a grep around the web and I can't see any tools or libraries
that have
been created already to perform functions like this. I know everyone has
their
own scripts (I've got one written in shell but it won't be of much use
here. I
would suggest writing it in Scheme so it could be easier to add more complex
features and it's familiar to Guix developers.
1. Put a magic comment above each package that you would like to move.
2. Run a simple script that makes a note of all of these into a
to-move-list.
3. Then stash the change with the comments you made (in case you need
to change
things)
4. Run another script that takes the package list and performs the move in
one's repository.
5. Sort out the use-package declarations manually and run tests.
6. When satisfied, stash the change and keep just the use-package changes.
7. Run a final script that loops through all the packages and commits
each one
in turn.
8. Rebase to suit.
That's 3 scripts:
- xyz-source-transform-read-packages scm-filename package-list (for
step 2)
- xyz-source-transform-move-packages package-list from-filename
to-filename
(for step 4)
- xyz-source-transform-stage-package-commit package-list from-filename
to-filename (for step 7)
(Where 'xyz' is either 'guix' or something else depending on where the
code ends
up part of Guix or not. That's not important for now.)
Some caveats:
- I'm not a scheme programmer, but I did use Haskell at university so I'm
familiar with thinking in a functional style.
- For this to work, you'd have to update most package files that
reference (gnu
package golang) to also reference the new package, so there will be some
use-module redundancy (which could be resolved in a final clean-up
commit).
I'm also imagining some the possibility of having a script that can remove
redundant #:use-module's in the future, though I don't know if we care
about a
few unneeded modules being included.
I'd love to hear what you think before I fire up another emacs instance.
Does it
sound like a realistic workflow?
All comments welcome!
Kind regards,
- Christina
next prev parent reply other threads:[~2024-01-20 19:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 2:00 Golang mudules to follow common grouping Sharlatan Hellseher
2023-10-10 3:52 ` Maxim Cournoyer
2023-10-19 1:34 ` Sharlatan Hellseher
2023-10-15 21:12 ` Wilko Meyer
2023-10-16 18:17 ` Sharlatan Hellseher
2023-10-19 9:40 ` Sharlatan Hellseher
2023-10-30 1:17 ` Sharlatan Hellseher
2024-01-13 21:05 ` Sharlatan Hellseher
2024-01-18 19:36 ` Maxim Cournoyer
2024-01-20 10:01 ` Sharlatan Hellseher
2024-02-13 14:45 ` Sharlatan Hellseher
2024-02-16 15:15 ` Maxim Cournoyer
2024-01-20 11:31 ` Christina O'Donnell
2024-01-20 12:26 ` Sharlatan Hellseher
2024-01-20 19:49 ` Christina O'Donnell [this message]
2024-01-20 18:33 ` Maxim Cournoyer
-- strict thread matches above, loose matches on Subject: below --
2023-12-11 9:21 Sharlatan Hellseher
2024-01-29 0:34 Sharlatan Hellseher
2024-01-29 23:15 ` Christina O'Donnell
2024-02-05 0:19 ` Christina O'Donnell
2024-02-05 14:00 ` Sharlatan Hellseher
2024-02-05 18:44 ` Christina O'Donnell
2024-02-05 19:52 ` Sharlatan Hellseher
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f26a2d80-f064-53ab-b3a8-486f90df1bce@mutix.org \
--to=cdo@mutix.org \
--cc=guix-devel@gnu.org \
--cc=sharlatanus@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.