From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers. Date: Tue, 26 Jan 2016 02:33:21 +0300 Message-ID: <87wpqx5j5q.fsf@gmail.com> References: <1453666771-16869-1-git-send-email-mthl@gnu.org> <1453666771-16869-5-git-send-email-mthl@gnu.org> <87y4bd2v6x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNqdR-0001tr-UB for guix-devel@gnu.org; Mon, 25 Jan 2016 18:33:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNqdP-000317-80 for guix-devel@gnu.org; Mon, 25 Jan 2016 18:33:25 -0500 In-Reply-To: <87y4bd2v6x.fsf@gnu.org> (Mathieu Lirzin's message of "Mon, 25 Jan 2016 22:41:42 +0100") 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: Mathieu Lirzin Cc: guix-devel Mathieu Lirzin (2016-01-26 00:41 +0300) wrote: > "Thompson, David" writes: > >> Does the fact that so many files needed to be edited indicate the need >> for a single specification string constructor? If this had already >> been the case, then this patch would have only needed to change 1 or 2 >> procedures. > > I don't know if such string constructor would help here. My change log > is maybe a bit misleading. Most of the files changed are for > documentation and tests which require inevitably to be updated manually > for such interface change. > > Some noise is introduced because now the canonical package full name > (with '@') is not a factor of the store file names anymore (which still > uses '-'). Maybe there can be some improvements on this side? > > Finally, There is some code redundancy for the emacs UI but If I > remember correctly there is a reason for that. (Alex?) If there is redundancy in the code, it should be removed. I didn't find a procedure to make a name specification at the time, so I wrote 'make-package-specification' in "emacs/guix-main.scm". I think we can add a general procedure to construct a name specification to (guix utils): (define* (package-name-specification name #:optional version output) (let ((full-name (if version (string-append name "@" version) name))) (if output (string-append full-name ":" output) full-name))) Then 'package-full-name' from (guix packages) and the code from "emacs/guix-main.scm" can use it. WDYT? -- Alex