From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:38339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn8pX-0004lv-F0 for guix-patches@gnu.org; Fri, 25 Jan 2019 16:16:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn8pW-0004Rl-KJ for guix-patches@gnu.org; Fri, 25 Jan 2019 16:16:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46342) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn8pW-0004RM-G2 for guix-patches@gnu.org; Fri, 25 Jan 2019 16:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gn8pW-0000Fg-4T for guix-patches@gnu.org; Fri, 25 Jan 2019 16:16:02 -0500 Subject: [bug#34040] [PATCH 1/2] refresh: Suggest input changes when updating. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <8736pzpnhg.fsf@elephly.net> <20190111094208.28327-1-rekado@elephly.net> <87bm49itkj.fsf@gnu.org> <87k1isvhbe.fsf@elephly.net> Date: Fri, 25 Jan 2019 22:15:34 +0100 In-Reply-To: <87k1isvhbe.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 25 Jan 2019 17:21:41 +0100") Message-ID: <87y378moax.fsf@gnu.org> 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: Ricardo Wurmus Cc: 34040@debbugs.gnu.org Hello, Ricardo Wurmus skribis: >> 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 fr= om calling > =E2=80=9Cchanged-inputs=E2=80=9D on a newly imported package. I wanted t= o avoid the > import when a user is not interested in the =E2=80=9Cinput-changes=E2=80= =9D field. I see, that makes sense. >> 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 = all >> updaters to return multiple values. > > This sounds like a good idea and I=E2=80=99m fine with changing all of the > importers. Cool! >> Alternately, we could change =E2=80=98input-changes=E2=80=99 to =E2=80= =98inputs=E2=80=99, which would be >> absolute, not relative, and thus =E2=80=98package-update=E2=80=99 would = take 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. OTOH if we return a complete list of inputs, then we don=E2=80=99t have to = worry about the cost of =E2=80=98changed-inputs=E2=80=99 since that would only be= called on demand; also there=E2=80=99d be a single call site for =E2=80=98changed-inp= uts=E2=80=99. Well, you tell us! :-) Thanks, Ludo=E2=80=99.