unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Christina O'Donnell <cdo@mutix.org>
To: Simon Tournier <zimon.toutoune@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Mechanism for helping in multi-channels configuration (and Xapian index)
Date: Mon, 18 Mar 2024 16:05:28 +0000	[thread overview]
Message-ID: <09733ef0-61a1-650b-c6d3-6f51ca91e9d5@mutix.org> (raw)
In-Reply-To: <87mss17opr.fsf@gmail.com>

Hi Simon,

Sorry for the really long delay, I meant to reply after I'd had a good 
read through the conversation you linked, but I haven't had a chance to 
really get into it yet, but I have read enough to get a surface idea of 
the project. The project looks fun, and looks like it will help Guix 
users and developers so I'd be on board in principle.

On 15/02/2024 15:05, Simon Tournier wrote:
>> ...
> I think you mean ’fold-packages’.
>
>>    2. Have a script that determines the symbols needed by each file. (Macros
>>       make this more difficult, but.)
> Well, this would be difficult, IMHO.  Somehow, it is what the compiler
> does. :-)
I asked on guile-devel and Maxime suggested using `module-map` or 
`module-for-each` which map over all symbols in a module. Presumably 
this would know what's quotes literally and what's a proper symbol.
>>    3. Have both scripts have an incremental version that runs on diffs (for
>>       performance).
>>    4. Run this for every commit on every branch on every channel caching the
>>       result.
>>    5. Have a CI script keep this updated for new commits.
>>    6. Have a server track incompatibilities.
> Here, I think the issue is that one server needs to track all the
> channels.  And that’s a too strong assumption, IMHO.
>
> I think the design should be something on channel maintainer side.
> Somehow, the main Guix channel could be seen as a Git submodule from the
> channel side and the issue is that information is not tracked.
>
> There is this ’.guix-channel’ file which allows to describe channel
> dependencies.  And the improvements could be to add more there.  The
> question is what to add and how to add it.  Keeping in mind the
> simplicity and the maintenance burden-free. :-)

Okay, this makes sense. I'm thinking that you could have something like 
a sqlite index that can be generated by running a script on the code. 
The index could exist on the server separate to the channel repo, 
pointed at by the .guix-channel file. The commit hook could: (1) update 
the local index to include the latest commit; (2) update the hash inside 
.guix-channel. Then a push hook could also push the index to the server.

It's a bit clunky because you've got this binary blob that you have to 
synchronize with the channel, and it's easy to get this wrong. Putting 
the index in the channel repo would bloat the channel with old versions 
of the index. Forcing users to generate the index from scratch is 
undesirable too.

As an alternative to having the index referenced in the .guix-channel, 
we could use git-annex. This would take care of: Fetching the index, 
uploading the new index on push, and updating the hash. No extra steps 
would be /required/ by developers, as it won't be necessary to have the 
index 100% up to date. But developers could choose to regenerate the 
index and call `git annex sync`. I suspect that adding git-annex as a 
dependency would be resisted, but that's the way I think would work 
best. And could apply to existing indexes. It depends on how long it 
takes to generate the index from scratch. There was some talk of 
data.guix.gnu.org using PostgreSQL to index packages. I suppose it'd be 
worth figuring out what they do to see if they have anything sql or code 
that might be portable to sqlite.

>> Full disclosure: I've got nothing lined up for the summer yet, so I'm on the
>> prowl for GSoC projects :)
> Cool!
>
> In that spirit, one tool that is missing is: search packages in all the
> history. Somehow the need is described by this message [1]: how to find
> which Guix revision provides which version of Foo?
>
> In addition, “guix search” is slow [2].
>
> Well, I have started the embryo of an extension based on Guile-Xapian
> for indexing and improving the search.  Really an embryo. :-)
>
> I think this would fit some GSoC. ;-)

As I said above, [2] is a fairly long thread, but I think I get the 
general idea. It seems that Xapian was implemented but didn't have the 
desired speedup. Am I getting the right impression there?

It's certainly an interesting problem. I'll keep thinking about it.

Kind regards,

Christina

> 1: Re: List available versions of package.
> Philippe Veber <philippe.veber@gmail.com>
> Tue, 11 Jun 2019 09:43:08 +0200
> id:CAOOOohSzUezKvm=RO0bXRGH3m0eo2x0cOTvd--vARxWoqtceaQ@mail.gmail.com
> https://lists.gnu.org/archive/html/help-guix/2019-06
> https://yhetil.org/guix/CAOOOohSzUezKvm=RO0bXRGH3m0eo2x0cOTvd--vARxWoqtceaQ@mail.gmail.com
>
> 2: https://issues.guix.gnu.org/issue/39258


  reply	other threads:[~2024-03-18 16:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03 10:36 Mechanism for helping in multi-channels configuration Simon Tournier
2024-02-03 15:27 ` Christina O'Donnell
2024-02-15 15:05   ` Simon Tournier
2024-03-18 16:05     ` Christina O'Donnell [this message]
2024-05-06 12:05       ` Mechanism for helping in multi-channels configuration (and Xapian index) Simon Tournier
2024-02-06 14:18 ` Mechanism for helping in multi-channels configuration Maxim Cournoyer
2024-02-06 17:08   ` Attila Lendvai
2024-02-06 17:16 ` Attila Lendvai
2024-02-15 21:14   ` Simon Tournier
2024-03-12 12:44     ` Attila Lendvai

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=09733ef0-61a1-650b-c6d3-6f51ca91e9d5@mutix.org \
    --to=cdo@mutix.org \
    --cc=guix-devel@gnu.org \
    --cc=zimon.toutoune@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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).