Hi,

On Thu, 12 Jul 2012 20:46:47 +0200 Peter Bex <[email protected]> wrote:

> I had some networking trouble just now and noticed that chicken-install
> showed the following output, which is obviously incorrect:
>
> TCP connect timeout
>
> Error: bad argument count - received 2 but expected 3: #<procedure>
>
> A similar situation can easily be triggered by calling chicken-install
> with a nonexistent hostname:
>
> $ chicken-install -l foo bar
> retrieving ...
> connecting to host "foo", port 80 ...
> TCP connect timeout
>
> Error: bad argument count - received 2 but expected 3: #<procedure>
>
> The attached patch fixes the immediate error by calling "proc" with
> three arguments instead of two.  However, I'm still a little unsure
> how this is supposed to work.  For example, in
> list-available-extensions, if "trans" is false, it will invoke the
> NEXT procedure, which is #f.  I've tried but was unable to trigger
> an error situation, so I suppose it's okay the way it is (but I still
> don't understand).

Shouldn't `with-default-sources' give something like

      (lambda ()
        (with-output-to-port (current-error-port)
          (lambda ()
            (print "Could not determine a source of extensions. "
                   "Please, specify a location and a transport for a source.")))
        (exit 1))

as the third argument to proc?  Or maybe it could simply abort instead
of calling proc.

Also, maybe `list-available-extensions' should test against `(and trans
locn)' since the procedures wrapped by `list-extensions' would error out
if given a location as #f.

Best wishes.
Mario
-- 
http://parenteses.org/mario

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to