From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:50877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn4G1-0007Q3-9P for guix-patches@gnu.org; Fri, 25 Jan 2019 11:23:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn4G0-0003Th-EP for guix-patches@gnu.org; Fri, 25 Jan 2019 11:23:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46156) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn4Fz-0003TP-89 for guix-patches@gnu.org; Fri, 25 Jan 2019 11:23:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gn4Fy-0007xV-UD for guix-patches@gnu.org; Fri, 25 Jan 2019 11:23:03 -0500 Subject: [bug#34040] [PATCH 1/2] refresh: Suggest input changes when updating. Resent-Message-ID: References: <8736pzpnhg.fsf@elephly.net> <20190111094208.28327-1-rekado@elephly.net> <87bm49itkj.fsf@gnu.org> From: Ricardo Wurmus In-reply-to: <87bm49itkj.fsf@gnu.org> Date: Fri, 25 Jan 2019 17:21:41 +0100 Message-ID: <87k1isvhbe.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 34040@debbugs.gnu.org Hi, sorry for not repyling earlier. I did not see this message. > Ricardo Wurmus skribis: > >> (version upstream-source-version) ;string >> (urls upstream-source-urls) ;list of strings >> (signature-urls upstream-source-signature-urls ;#f | list of strings >> - (default #f))) >> + (default #f)) >> + (input-changes upstream-source-input-changes >> + (default '()) (thunked))) > > Any particular reason for making =E2=80=98input-changes=E2=80=99 thunked? > > This causes a failure in tests/upstream.scm (because two evaluator > procedures are unlikely to be eq?). I would fix it by removing the > =E2=80=98thunked=E2=80=99 property but I=E2=80=99m not sure if it=E2=80= =99d make sense. Oh, I=E2=80=99m sorry for breaking this. My thinking was that this field should be lazily evaluated, because it is somewhat expensive. =E2=80=9Cinput-changes=E2=80=9D gets its value from= calling =E2=80=9Cchanged-inputs=E2=80=9D on a newly imported package. I wanted to = avoid the import when a user is not interested in the =E2=80=9Cinput-changes=E2=80=9D= field. > Another thing: =E2=80=9Cupstream source=E2=80=9D designates something > absolute/stateless, but =E2=80=9Cinput changes=E2=80=9D designates someth= ing > relative/stateful. So on second thought, I wonder whether > is the right place for it. > > I was thinking that updaters could maybe return two values > ( + list of changed inputs), which would be equivalent > but somewhat clearer. The downside is that we=E2=80=99d have to change a= ll > updaters to return multiple values. This sounds like a good idea and I=E2=80=99m fine with changing all of the importers. > Alternately, we could change =E2=80=98input-changes=E2=80=99 to =E2=80=98= inputs=E2=80=99, which would be > absolute, not relative, and thus =E2=80=98package-update=E2=80=99 would t= ake care of > calling =E2=80=98changed-inputs=E2=80=99 etc. That would also work, but I think I prefer an updater to report changes rather than a new list of inputs. -- Ricardo