From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Channel dependencies Date: Mon, 22 Oct 2018 14:04:06 +0200 Message-ID: <87va5umbm1.fsf@gnu.org> References: <877eimnxpq.fsf@mdc-berlin.de> <87pnwbim2q.fsf@gnu.org> <87tvljknpb.fsf@mdc-berlin.de> <87k1mcpcgx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEYwM-0006lJ-6h for guix-devel@gnu.org; Mon, 22 Oct 2018 08:04:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEYwL-0000cV-B9 for guix-devel@gnu.org; Mon, 22 Oct 2018 08:04:10 -0400 In-Reply-To: <87k1mcpcgx.fsf@gmail.com> (Chris Marusich's message of "Sat, 20 Oct 2018 13:52:46 -0700") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Chris Marusich Cc: guix-devel@gnu.org, Ricardo Wurmus Hello! Chris Marusich skribis: > Ricardo Wurmus writes: > >> [...] >> >>> Chris raises interesting issues. I think it=E2=80=99s OK to first come= up with >>> an implementation that has some limitations but works with the simple >>> use cases we have in mind. >> >> I=E2=80=99ve fixed this according to what we=E2=80=99ve discussed: when = more than one of >> the user-provided or channel-required channels have the same name we >> ignore the more recent specification unless it is more specific >> (i.e. the new channel specification mentions a commit while the former >> did not). > > As long as the "channel resolution mechanism" is deterministic, it's > probably OK. But if you have two channels A which depends on C, and B > which depends on C', where C' is a different version of C, then we can > arrive in a situation where the author of A tests and provides support > for their package definitions in the absence of channel B, and the > author of B tests and provides support for their package definitions in > the absence of channel A, and a user who wants to use packages from both > A and B is stuck because one of the channel owners (the one whose > dependency we didn't pick) doesn't want to support that use case. Good point. I agree that it=E2=80=99s similar to the question of propagated inputs, which we deal with by reporting an error when a collision arises. So, similarly, I think the safe way would be to report an error when channel requirements conflict. We must define what it means for two s to conflict: =E2=80=A2 if a channel=E2=80=99s =E2=80=98commit=E2=80=99 is #f, then any= channel with the same name but a different =E2=80=98uri=E2=80=99 and/or a different =E2=80=98branc= h=E2=80=99 and/or a non-#f commit conflicts; =E2=80=A2 if a channel=E2=80=99s =E2=80=98commit=E2=80=99 is not #f, then= any channel with the same name and otherwise different fields conflicts. WDYT? If we have inspiration later, we can liberalize this, for instance by using several inferiors. It would be quite a bit of extra work, and it=E2=80=99s not immediately clear to me how that could work. I believe wh= at Ricardo proposes already covers many use cases anyway. Thanks, Ludo=E2=80=99.