Cyril Roelandt <tipec...@gmail.com> skribis: > On 12/29/2014 03:23 PM, Ludovic Courtès wrote: >> Cyril Roelandt <tipec...@gmail.com> 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.
Right, and I think it’s 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’.