From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] lint: add 'source' checker. Date: Sat, 03 Jan 2015 20:11:09 +0100 Message-ID: <87iognadde.fsf@gnu.org> References: <54A0C5A8.2030105@gmail.com> <1419824407-6471-1-git-send-email-tipecaml@gmail.com> <871tni357m.fsf@gnu.org> <54A7575E.7040903@gmail.com> 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]:51019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7U6R-0002f6-GY for guix-devel@gnu.org; Sat, 03 Jan 2015 14:11:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7U6N-00048V-FC for guix-devel@gnu.org; Sat, 03 Jan 2015 14:11:11 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:53720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7U6N-00048R-8b for guix-devel@gnu.org; Sat, 03 Jan 2015 14:11:07 -0500 In-Reply-To: <54A7575E.7040903@gmail.com> (Cyril Roelandt's message of "Sat, 03 Jan 2015 03:43: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: Cyril Roelandt Cc: guix-devel@gnu.org Cyril Roelandt skribis: > On 12/29/2014 03:23 PM, Ludovic Court=C3=A8s wrote: >> Cyril Roelandt skribis: >>=20 >>> * guix/scripts/lint.scm (uri-available?): New procedure. >>> (%checkers): Add 'home-page' checker >>=20 >> Some comments in addition to what David already wrote. >>=20 >>> +(define (uri-available? uri) >>> + "Return #t if the given URI can be reached, otherwise throw a >>> +'not-available exception along with an appropriate error message." >>=20 >> By convention, one would expect =E2=80=98uri-available?=E2=80=99 to retu= rn #t or #f, not >> to throw. >>=20 >> How about calling it =E2=80=98validate-uri=E2=80=99 and directly call = =E2=80=98emit-warning=E2=80=99 >> from there? It would need the field name as an additional argument. >>=20 > > This would also require passing the "package" to validate-uri. Right, and I think it=E2=80=99s fine. > How about we make uri-available? return #t/#f, and just don't really > care about the exact reason why it failed ? Anyway a human being is > going to manually check what happened to know whether this is a real > issue or just a server that went down for a couple hours, or a file > that wrongly got removed... Possibly but still, I prefer to have detailed reports since we already have all the details anyway. Thanks, Ludo=E2=80=99.