greghendershott / racket-mode

Emacs major and minor modes for Racket: edit, REPL, check-syntax, debug, profile, packages, and more.
https://www.racket-mode.com/
GNU General Public License v3.0
683 stars 93 forks source link

Tolerate broken Typed Racket #457

Open greghendershott opened 4 years ago

greghendershott commented 4 years ago

@samth reported on Slack that breaking Typed Racket now breaks Racket Mode.

For example "go to the typed-racket/main.rkt and add an extra (".

It breaks it because racket-mode now (transitively) depends on TR, so starting racket-mode fails I think it's because drracket/check-syntax transitively depends on TR maybe because the blueboxes code is typed

I suggested temporarily disabling racket-xp-mode until the error is resolved. But:

greghendershott commented 4 years ago

@samth Actually which "main.rkt" file do you mean? I don't have any in Racket 7.6.

When I add an unclosed ( to (just guessing) typed-racket-lib/typed/racket/base.rkt things actually work fine for me.

At first I thought, well that's because the Racket Mode back end was already loaded, as a result of racket-xp-mode starting it for some other file. But, even when I M-x racket-stop-back-end, then visit the munged base.rkt, the back end still starts fine.

So, this issue seems to be related to some very specific file?? Or I'm just not understanding.

samth commented 4 years ago

The particular file I broke was typed-racket/utils/prefab-c.rkt.

greghendershott commented 4 years ago

Hmm I still can't reproduce with that file. Even when I ensure the back end is stopped before visiting the file, such that it would be started and elicit some error due to any dependence on Typed Racket.

  1. Can you show me details about the error that you see?

  2. In a racket-mode buffer, if you C-h v and enter eldoc-documentation-function, what is the value? The default for racket-mode is nil, which is what I have. If you had set it to racket-xp-eldoc-function, that might explain this. Does setting it to nil fix this problem? Please let me know either way?

greghendershott commented 4 years ago

Commit 47b9041 in February added support for blueboxes to racket-xp-eldoc-function. But by default that function is not used.