Hi Guix,

There's been several disucssions and efforts towards commands
introducing functionality to interact with guixes store in a broader
sense and with ATerm/.drv files in a narrower sense over the course of
the last months (probably years?). Currently I'm aware of at least:

- WIP: scripts: pp-store: New command. #6199 in
  https://codeberg.org/guix/guix/pulls/6199
- guix: scripts: Add guix diff. #3969 in
  https://codeberg.org/guix/guix/pulls/3969
- Indent G-expression generated scripts and derivation files in the
  store #2354 in
  https://codeberg.org/guix/guix/issues/2354

covering different proposals of introducing a guix subcommand to:

- print/pretty-print .drv files (6199, 2354)
- diff derivations (mentioned in 6199, 3969, 2354)
- analyze aspects of items such as references, size
  etc. (mostly 6199)

and probably other adjacent functionality as well I'm not aware of. IMHO
this means two things in the first place:

- that there currently seems to be a (at least perceived) lack of
  functionality around the broad area of store interaction/ATerm .drv
  file interaction and people care enough about it to come up with three
  separate solutions tackling different aspects.
- that, as all three proposed solutions I am aware of on Codeberg fall
  under GCD territory, it would probably be a good idea to have this
  discussion on guix-devel (which is why I am writing this mail).

While I am personally more interested in diff and analyze
functionality than in pretty-printing, I do like the suggestion made
in #6199 to consider introducing a guix store command for these types
of interactions.

@Rutherther wrote in
https://codeberg.org/guix/guix/pulls/6199#issuecomment-10442992:

> I personally would definitely appreciate if there was a store
> command that made gc obsolete and replaced it, but with more
> subcommands. Because how does for example listing references/referrers
> go under a 'garbage collection' command? IMO it doesn't.
>
> So sketching out a new store command that will do stuff like that
> and include a pretty printing is definitely something I would
> support. Having a guix subcommand just for pretty printing is not
> something I personally would appreciate in any way.
>
> Ie.
>
> ```text
> guix store pretty-print [file]
>
> guix store references <path>
> guix store referrers <path>
> guix store gc [-D paths]
> guix store list-roots
> guix store list-busy
> guix store list-live
> guix store verify [contents,repair]
> guix store optimize
> ```

which seems like a reasonable idea and starting point for a GCD to house
most plumbing commands suggested in the several codeberg discussions
under one umbrella.

I would be willing to help with/(co-?)author such a GCD, but I think it
would make sense to discuss two things first:

- what's the general opinion regarding such a possible guix store
  command and the scope of it?
- what other, not already mentioned, issues exist in the realms of
  store and ATerm .drv interactions that could possibly be solved in
  an effort of a possible GCD?

-- 
Kind regards,
Wilko Meyer

Reply via email to