From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: Re: [PATCH] lint: add 'source' checker. Date: Sat, 03 Jan 2015 03:43:42 +0100 Message-ID: <54A7575E.7040903@gmail.com> References: <54A0C5A8.2030105@gmail.com> <1419824407-6471-1-git-send-email-tipecaml@gmail.com> <871tni357m.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]:51360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7Egz-0001nh-MW for guix-devel@gnu.org; Fri, 02 Jan 2015 21:43:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7Egv-0006Ib-Kj for guix-devel@gnu.org; Fri, 02 Jan 2015 21:43:53 -0500 In-Reply-To: <871tni357m.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: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= Cc: guix-devel@gnu.org On 12/29/2014 03:23 PM, Ludovic Courtès wrote: > Cyril Roelandt skribis: > >> * guix/scripts/lint.scm (uri-available?): New procedure. >> (%checkers): Add 'home-page' checker > > Some comments in addition to what David already wrote. > >> +(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." > > By convention, one would expect ‘uri-available?’ to return #t or #f, not > to throw. > > How about calling it ‘validate-uri’ and directly call ‘emit-warning’ > from there? It would need the field name as an additional argument. > This would also require passing the "package" to validate-uri. 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... Cyril.