[racket] corrupted filenames command-line error messages

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Sat Jan 28 10:57:30 EST 2012

On Sat, Jan 28, 2012 at 10:44 AM, Neil Van Dyke <neil at neilvandyke.org> wrote:
> Er, I suppose that the entirety of "procedure ...oice-style-3.rkt:169:27" is
> the inferred procedure name, and that the syntax's filename&line&column
> location info was lost.

I don't think anything is being lost here.  Line 169 appears to be the
definition of a two-argument anonymous procedure, which is apparently
being applied to 3 arguments.  I assume that file has a file name that
ends in oice-style-3.rkt.

> Neil Van Dyke wrote at 01/28/2012 10:38 AM:
>
>> Any idea why this Racket command line error message doesn't give a proper
>> filename?
>>
>> Let's say that the filename is "xxxx-invoice-style-3.rkt".  I get an error
>> message that looks like this (with "[...]" used here to redact info from the
>> actual error message):
>>
>> procedure ...oice-style-3.rkt:169:27: expects 2 arguments, given 3: [...]
>>
>> If it matters, this error is occurring in code like:
>>
>> (html-template
>>  [...]
>>  (%eval/effects-only
>>   (for-each
>>    (lambda (aaa)
>>      (apply (lambda (bbb ccc)    ; <== LINE 169
>>               [...])
>>             ddd))))
>>  [...])
>>
>> If you don't immediately know where the cause might be in the Racket
>> interpreter, then I'd suspect that the "html-template" macro is somehow
>> corrupting the location info (e.g., resulting in an (non-)inferred procedure
>> name somehow getting where the filename should be in the error message), and
>> so I'd audit "html-template" in that case.
>
>
> --
> http://www.neilvandyke.org/
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users



-- 
sam th
samth at ccs.neu.edu


Posted on the users mailing list.