From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: swh-plugins-lv2: New variable [WIP] v2 Date: Wed, 9 Dec 2015 16:24:43 -0500 Message-ID: <20151209212443.GB1835@jasmine> References: <5664BA45.3080600@gmx.net> <5664BB8C.6030100@gmx.net> <87wpsqm00d.fsf@elephly.net> <87r3ixzifw.fsf@netris.org> <87y4d59vap.fsf@gnu.org> <20151209200405.GA19108@jasmine> <87r3ivl4sa.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6mE9-0007BQ-72 for guix-devel@gnu.org; Wed, 09 Dec 2015 16:24:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6mE4-00014x-GD for guix-devel@gnu.org; Wed, 09 Dec 2015 16:24:45 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:59268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6mE4-00014q-B3 for guix-devel@gnu.org; Wed, 09 Dec 2015 16:24:40 -0500 Content-Disposition: inline In-Reply-To: <87r3ivl4sa.fsf@gnu.org> 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: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org On Wed, Dec 09, 2015 at 09:56:37PM +0100, Ludovic Courtès wrote: > Leo Famulari skribis: > > > On Tue, Dec 08, 2015 at 09:52:30AM +0100, Ludovic Courtès wrote: > >> Mark H Weaver skribis: > >> > >> > Ricardo Wurmus writes: > >> > > >> >>> +(define-public swh-plugins-lv2 > >> >>> + (let ((commit "5098e09e255eaed14e0d40ca5e7e6dfcb782d7ea")) > >> >> > >> >> We usually don’t 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 this > >> > package+version several years from now. > >> > >> I sympathize with this. I would think 10 digits is more than needed, > >> though: With 6 hex digits, it takes on average 16^6 = 16M commits before > >> the 6-digit ID is ambiguous, and with 8 hex digits that goes to > >> 4 billion commits (Emacs has around 123,000 commits as an example.) > >> > >> But anyway, to be super-safe, we could use the full SHA1 in the URL, but > >> strip it in the ‘version’ field so that it remains readable. > >> > >> 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 ‘version’ field shows up in user interfaces, where aesthetics do > matter IMO. WDYT? > > (In some cases, it’s also a good way to avoid hitting limitations on the > shebang length and on the AF_UNIX socket name length.) Okay, then I like your idea of using the full SHA1 in URLs but truncating it in the 'version' field. > > Ludo’.