unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guix-devel@gnu.org, Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Subject: Re: Channel dependencies
Date: Sun, 14 Oct 2018 11:49:40 +0200	[thread overview]
Message-ID: <871s8soo26.fsf@elephly.net> (raw)
In-Reply-To: <87k1ml8e7r.fsf@gmail.com>


Hi Chris,

>>  (define (latest-channel-instances store channels)
>>    "Return a list of channel instances corresponding to the latest checkouts of
>> -CHANNELS."
>> -  (map (lambda (channel)
>> -         (format (current-error-port)
>> -                 (G_ "Updating channel '~a' from Git repository at '~a'...~%")
>> -                 (channel-name channel)
>> -                 (channel-url channel))
>> -         (let-values (((checkout commit)
>> -                       (latest-repository-commit store (channel-url channel)
>> -                                                 #:ref (channel-reference
>> -                                                        channel))))
>> -           (channel-instance channel commit checkout)))
>> -       channels))
>> +CHANNELS and the channels on which they depend."
>> +  (append-map (lambda (channel)
>> +                (format (current-error-port)
>> +                        (G_ "Updating channel '~a' from Git repository at '~a'...~%")
>> +                        (channel-name channel)
>> +                        (channel-url channel))
>> +                (let-values (((checkout commit)
>> +                              (latest-repository-commit store (channel-url channel)
>> +                                                        #:ref (channel-reference
>> +                                                               channel))))
>> +                  (let ((instance (channel-instance channel commit checkout)))
>> +                    (cons instance (latest-channel-instances
>> +                                    store
>> +                                    (channel-instance-dependencies instance))))))
>> +              channels))
>
> What happens if the dependency list contains duplicate channels?  This
> might happen if two unrelated channels mutually depend upon a third
> channel.
>
> What happens if the dependency list contains two channels that differ
> only in their branch (or commit), and are the same in every other way?
> This might happen if two unrelated channels mutually depend upon two
> different versions of the same third channel.

I was going to write an email about this just now.  This is indeed a
problem with this naive implementation.

For reproducibility a user may want to pin all channels to a certain
commit, but channels that are dependencies are exempt from that
mechanism as they are added to the list of channels to be instantiated
during the run of “guix pull”.

It should be possible to pin *all* channels, even if they are
dependencies of other channels.  One way is to treat all channels and
their dependencies as a unique set where duplicates are replaced with
the most specific description (e.g. those specifying a commit).  This
way users could fully specify dependencies, which would then be used
instead of the channel’s declared dependency.

This needs some more thought.

--
Ricardo

  reply	other threads:[~2018-10-14  9:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-13  6:54 Channel dependencies Ricardo Wurmus
2018-10-13 11:09 ` Pierre Neidhardt
2018-10-14  2:16 ` Chris Marusich
2018-10-14  9:49   ` Ricardo Wurmus [this message]
2018-10-15  9:29     ` Ludovic Courtès
2018-10-15  9:35       ` Ricardo Wurmus
2018-10-15 11:49         ` Ludovic Courtès
2018-10-15  9:41 ` Ludovic Courtès
2018-10-18 20:24   ` Ricardo Wurmus
2018-10-20 20:52     ` Chris Marusich
2018-10-22 12:04       ` Ludovic Courtès
2018-10-23  7:44         ` Chris Marusich
2018-10-24 13:14           ` Ludovic Courtès
2018-10-22 12:14     ` Ludovic Courtès

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=871s8soo26.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /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).