From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: swh-plugins-lv2: New variable [WIP] v2 Date: Wed, 09 Dec 2015 21:56:37 +0100 Message-ID: <87r3ivl4sa.fsf@gnu.org> References: <5664BA45.3080600@gmx.net> <5664BB8C.6030100@gmx.net> <87wpsqm00d.fsf@elephly.net> <87r3ixzifw.fsf@netris.org> <87y4d59vap.fsf@gnu.org> <20151209200405.GA19108@jasmine> 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]:56569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6ln1-0005AY-Ox for guix-devel@gnu.org; Wed, 09 Dec 2015 15:56:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6lmy-0001xS-Ic for guix-devel@gnu.org; Wed, 09 Dec 2015 15:56:43 -0500 In-Reply-To: <20151209200405.GA19108@jasmine> (Leo Famulari's message of "Wed, 9 Dec 2015 15:04:05 -0500") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Leo Famulari Cc: guix-devel@gnu.org Leo Famulari skribis: > On Tue, Dec 08, 2015 at 09:52:30AM +0100, Ludovic Court=C3=A8s wrote: >> Mark H Weaver skribis: >>=20 >> > Ricardo Wurmus writes: >> > >> >>> +(define-public swh-plugins-lv2 >> >>> + (let ((commit "5098e09e255eaed14e0d40ca5e7e6dfcb782d7ea")) >> >> >> >> We usually don=E2=80=99t use full commit hashes. You could probably = trim it to >> >> the first six characters or so. >> > >> > I would recommend using at least 10 characters, maybe more. We should >> > use enough characters to ensure that the commit id remains unique for = as >> > long as this package version remains in use -- keeping in mind that for >> > purposes of reproducing old experiments, someone might try to build th= is >> > package+version several years from now. >>=20 >> I sympathize with this. I would think 10 digits is more than needed, >> though: With 6 hex digits, it takes on average 16^6 =3D 16M commits befo= re >> the 6-digit ID is ambiguous, and with 8 hex digits that goes to >> 4=C2=A0billion commits (Emacs has around 123,000 commits as an example.) >>=20 >> But anyway, to be super-safe, we could use the full SHA1 in the URL, but >> strip it in the =E2=80=98version=E2=80=99 field so that it remains reada= ble. >>=20 >> Thoughts? > > I don't see a reason to not use the full hash. I know the odds but why > discard the information? We can't complain about it being ugly given the > aesthetics of /gnu/store. ;) The =E2=80=98version=E2=80=99 field shows up in user interfaces, where aest= hetics do matter IMO. WDYT? (In some cases, it=E2=80=99s also a good way to avoid hitting limitations o= n the shebang length and on the AF_UNIX socket name length.) Ludo=E2=80=99.