racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
454 stars 93 forks source link

Update 'definition-text-surrogate to accept lists #244

Open LeifAndersen opened 5 years ago

LeifAndersen commented 5 years ago

Before a language's get-info function was expected to return a module-path? (or #f) for 'definitions-text-surrogate. Now a list is also acceptable, which can be used for meta-language's that combine their surrogate with the base language they are extending.

LeifAndersen commented 5 years ago

I've updated the docs. However I can't seem to find any existing tests for 'definitions-text-surrogate.

LeifAndersen commented 5 years ago

Ugg...

Thinking about it a bit more, a list can be a module-path? (Like in the case of '(submod "." hello). And with this current design, its impossible to determine if that is supposed to be one module path, or 3. :(

rfindler commented 5 years ago

Make a new key that drr will prefer that is always a list.

LeifAndersen commented 5 years ago

@rfindler Good idea. I've pushed that.

LeifAndersen commented 5 years ago

Any other comments @rfindler ?

rfindler commented 5 years ago

Is #f different than the empty list for definitions-text-surrogate-list?

The definition of mode on line module-language-tools.rkt seems unlikely to be correct as it might be a list and there is a send just below.

The docs would be clearer if they said explicitly what order the mixins are mixed in.

This seems unlikely to be correct:

If
 @language-info-ref[definitions-text-surrogate] returns
 @racket[#f] then DrRacket tries
 @racket['definitions-text-surrogate]

The comment "Will not work with the definitions text surrogate interposition that

lang allows. Need to deprecate that one" at the top of insulated-read-language.rkt suggests that maybe this is an ill-considered change.