[plt-dev] I am not using .rkt files yet...

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Apr 12 16:14:42 EDT 2010

On Mon, Apr 12, 2010 at 2:59 PM, Carl Eastlund <cce at ccs.neu.edu> wrote:
> I would really like to hear Matthew chime in on why we can't get
> precise source locations with the appropriate extension.

I see I wasn't very precise with my words. I don't think we can't.

Probably the contract library needs to do a better job building the
error messages from the module paths that it has.

Robby

> This message
> clearly comes up after the path has been resolved and a concrete file
> has been found.  Adding ".rkt" is inaccurate and using ".*" is
> imprecise.  What if someone has both a ".rkt" and a ".ss" file there?
> I don't know of any other language that refuses to give out accurate
> file extensions in error messages; this seems like a serious problem
> to me.
>
> Carl Eastlund
>
> On Mon, Apr 12, 2010 at 3:56 PM, Matthias Felleisen
> <matthias at ccs.neu.edu> wrote:
>>
>> Perhaps the easiest solution to get accurate error messages is to
>> NOT add an extension at all. This would report the error in terms
>> of the code that's written down and probably makes it easiest to
>> locate. DrScheme opens the correct file presumably -- Matthias
>>
>> On Apr 12, 2010, at 3:51 PM, Robby Findler wrote:
>>
>>> IIUC, .rkt is the default extension for module paths like (require
>>> planet/..../drscheme/dracula-state), ie those that do not have quotes.
>>>
>>> Then there is some magic munging that goes on whereby a .ss file in
>>> the place where a .rkt file is expected happens. I recall that
>>> Matthew, Matthias, Eli and I had a long discussion on the best way to
>>> accommodate such paths and this seems to be the best option. Matthew
>>> probably remembers more, since he seems to have implemented it
>>> recently.
>>>
>>> Robby
>>>
>>> On Mon, Apr 12, 2010 at 2:43 PM, Carl Eastlund <cce at ccs.neu.edu> wrote:
>>>>
>>>> ...but I am already getting error messages in terms of them:
>>>>
>>>>
>>>> /Users/cce/svn/2010-04-12/research/planet/dracula/drscheme/dracula-state.rkt:
>>>>  (file
>>>>
>>>>  /Users/cce/svn/2010-04-12/research/planet/dracula/drscheme/dracula-proof-panel.rkt)
>>>>  broke the contract
>>>>  (->
>>>>  (and/c
>>>>   dracula-state-active?
>>>>   (not/c dracula-state-error?))
>>>>  (and/c
>>>>   dracula-state?
>>>>   (not/c dracula-state-active?))) on dracula-state-done; expected
>>>> <(and/c dracula-state-active? (not/c dracula-state-error?))>, given:
>>>> #s(dracula-state #f #s(proof-table (Dracula) Dracula #hasheq((Dracula
>>>> . #s(proof-state #s(loc unsaved-editor1185 0 204) 5 #f #hash((0 .
>>>> #s(term-state #s(loc unsaved-editor1185 0 0) #f #f #f)) (1 .
>>>> #s(term-state #s(loc unsaved-editor1185 1 57) (include-b...
>>>>
>>>> This is incorrect, and for errors in someone else's code it would be
>>>> really confusing.  Error messages should not direct me to nonexistent
>>>> files.  Those things should have ".ss" extensions.
>>>>
>>>> Carl Eastlund
>>>> _________________________________________________
>>>>  For list-related administrative tasks:
>>>>  http://list.cs.brown.edu/mailman/listinfo/plt-dev
>>>>
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://list.cs.brown.edu/mailman/listinfo/plt-dev
>>
>>
>>
>


Posted on the dev mailing list.