[racket-dev] [plt] Push #29228: master branch updated

From: Stephen Chang (stchang at ccs.neu.edu)
Date: Mon Sep 15 21:08:37 EDT 2014

> Does starting a fresh drracket exhibit these problems, if you follow
> those steps right after starting up?

Yes I can reproduce consistently. But my steps were wrong. Here is the
correct sequence (extra run step after switching to "choose lang from
source"):

Steps to reproduce:
1) start drracket 6.1 windows 32 bit
2) select BSL
3) add "(require rackunit)" and run
4) switch to "determine language from source" AND RUN
expected error:

Module Language: only a module expression is allowed, either
    #lang <language-name>
 or
    (module <name> <language> ...)
 in: (require rackunit)

5) switch back to BSL


>
> Robby
>
>
> On Mon, Sep 15, 2014 at 7:37 PM, Stephen Chang <stchang at ccs.neu.edu> wrote:
>> My Drracket is crashing with the steps and error msg below. Does this
>> commit fix what I'm seeing?
>>
>> Steps to reproduce:
>> 1) start drracket 6.1 windows 32 bit
>> 2) select BSL
>> 3) add "(require rackunit)" and run
>> 4) switch to "determine language from source"
>> 5) switch back to BSL
>>
>>
>> skip-whitespace: called on a color:text<%> whose colorer is stopped.
>>   context...:
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\framework\private\color.rkt:966:4:
>> skip-whitespace method in ...rk/private/color.rkt:77:2
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\framework\private\color.rkt:813:12:
>> seq-loop
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\framework\private\color.rkt:802:4:
>> highlight-nested-region method in ...rk/private/color.rkt:77:2
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\framework\private\color.rkt:762:6:
>> core1469
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\framework\private\color.rkt:1192:4:
>> after-edit-sequence method in ...rk/private/color.rkt:77:2
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\mred\private\wxme\text.rkt:748:2:
>> end-edit-sequence method in text%
>>    set-surrogate method
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\drracket\drracket\private\module-language.rkt:2642:6:
>> set-current-mode method in .../module-language.rkt:2627:4
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\drracket\drracket\private\module-language.rkt:2635:6:
>> after-set-next-settings method in .../module-language.rkt:2627:4
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\mred\private\mrmenu.rkt:250:14:
>> command method in basic-selectable-menu-item%
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\mred\private\mrpopup.rkt:49:38: go
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:451:6
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:502:32
>>    C:\Program Files
>> (x86)\Racket\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:650:3
>>
>> On Sun, Sep 7, 2014 at 4:35 PM,  <robby at racket-lang.org> wrote:
>>> robby has updated `master' from df3c56fae2 to bc83e9b778.
>>>   http://git.racket-lang.org/plt/df3c56fae2..bc83e9b778
>>>
>>> =====[ 2 Commits ]======================================================
>>> Directory summary:
>>>   14.5% pkgs/drracket-pkgs/drracket/drracket/private/
>>>   79.5% pkgs/gui-pkgs/gui-lib/framework/private/
>>>    5.8% pkgs/gui-pkgs/gui-test/framework/tests/
>>>
>>> ~~~~~~~~~~
>>>
>>> f4d66ad Robby Findler <robby at racket-lang.org> 2014-09-07 15:34
>>> :
>>> | fix magic-open-paren bug
>>> |
>>> | also, replace some eq?s with equal?s.
>>> :
>>>   M pkgs/gui-pkgs/gui-lib/framework/private/racket.rkt | 11 ++++++-----
>>>   M pkgs/gui-pkgs/gui-test/framework/tests/racket.rkt  |  1 +
>>>
>>> ~~~~~~~~~~
>>>
>>> bc83e9b Robby Findler <robby at racket-lang.org> 2014-09-05 08:28
>>> :
>>> | Open Require Path: ignore .bak files under windows, but ~ files elsewhere
>>> |
>>> | instead of ignoring ~ files everywhere
>>> :
>>>   M .../drracket/drracket/private/find-completions.rkt           | 4 +++-
>>>
>>> =====[ Overall Diff ]===================================================
>>>
>>> pkgs/drracket-pkgs/drracket/drracket/private/find-completions.rkt
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> --- OLD/pkgs/drracket-pkgs/drracket/drracket/private/find-completions.rkt
>>> +++ NEW/pkgs/drracket-pkgs/drracket/drracket/private/find-completions.rkt
>>> @@ -24,7 +24,9 @@
>>>
>>>  (define (ignore? x)
>>>    (or (member x '("compiled"))
>>> -      (regexp-match #rx"~$" x)))
>>> +      (if (equal? (system-type) 'windows)
>>> +          (regexp-match #rx"[.]bak$" x)
>>> +          (regexp-match #rx"~$" x))))
>>>
>>>  (define (find-completions str the-current-directory #:alternate-racket [alternate-racket #f])
>>>    (cond
>>>
>>> pkgs/gui-pkgs/gui-lib/framework/private/racket.rkt
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> --- OLD/pkgs/gui-pkgs/gui-lib/framework/private/racket.rkt
>>> +++ NEW/pkgs/gui-pkgs/gui-lib/framework/private/racket.rkt
>>> @@ -1787,7 +1787,7 @@
>>>      (if (and (send text get-overwrite-mode) (= start-pos end-pos))
>>>          (send text insert "[" start-pos (add1 start-pos) #f)
>>>          (send text insert "[" start-pos 'same #f))
>>> -    (when (eq? (send text classify-position pos) 'parenthesis)
>>> +    (when (equal? (send text classify-position pos) 'parenthesis)
>>>        (let* ([before-whitespace-pos (send text skip-whitespace pos 'backward #t)]
>>>               [keyword/distance (find-keyword-and-distance before-whitespace-pos text)])
>>>          (cond
>>> @@ -1852,9 +1852,10 @@
>>>                                                                  0)])
>>>                              (cond
>>>                                [(and second-backwards-match2
>>> -                                    (eq? (send text classify-position second-backwards-match)
>>> -                                         ;;; otherwise, this isn't a `let loop', it is a regular let!
>>> -                                         'symbol)
>>> +                                    (member (send text classify-position second-backwards-match)
>>> +                                            ;;; otherwise, this isn't a `let loop',
>>> +                                            ;;; it is a regular let
>>> +                                            '(symbol keyword))
>>>                                      (member "let" letrec-like-forms)
>>>                                      (text-between-equal? "let"
>>>                                                           text
>>> @@ -1875,7 +1876,7 @@
>>>        [(and (preferences:get 'framework:automatic-parens)
>>>              (not (in-string/comment? text)))
>>>         (send text insert real-char start-pos start-pos)
>>> -       (when (eq? (send text classify-position start-pos) 'parenthesis)
>>> +       (when (equal? (send text classify-position start-pos) 'parenthesis)
>>>           (send text insert (case real-char
>>>                             [(#\() #\)]
>>>                             [(#\[) #\]]
>>>
>>> pkgs/gui-pkgs/gui-test/framework/tests/racket.rkt
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> --- OLD/pkgs/gui-pkgs/gui-test/framework/tests/racket.rkt
>>> +++ NEW/pkgs/gui-pkgs/gui-test/framework/tests/racket.rkt
>>> @@ -81,6 +81,7 @@
>>>  (test-magic-square-bracket 'let2 "(let (" "(let ([")
>>>  (test-magic-square-bracket 'let3 "(let loop " "(let loop (")
>>>  (test-magic-square-bracket 'let3 "(let loop (" "(let loop ([")
>>> +(test-magic-square-bracket 'let4 "(let rec (" "(let rec ([")
>>>  (test-magic-square-bracket 'cond1 "(cond " "(cond [")
>>>  (test-magic-square-bracket 'cond2 "(cond [" "(cond [(")
>>>  (test-magic-square-bracket 'with-syntax1 "(syntax-case x " "(syntax-case x (")

Posted on the dev mailing list.