racket-mode
racket-mode copied to clipboard
Tolerate broken Typed Racket
@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:
- Try that, confirm that works.
- Think about how to improve the experience. Maybe the Racket Mode back end
check-syntax
command could fail in a more graceful way (usingdynamic-require
and/orwith-handlers
) such that the front endracket-xp-mode
could disable or limit itself in a more-graceful way.
@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.
The particular file I broke was typed-racket/utils/prefab-c.rkt
.
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.
-
Can you show me details about the error that you see?
-
In a racket-mode buffer, if you C-h v and enter
eldoc-documentation-function
, what is the value? The default forracket-mode
isnil
, which is what I have. If you had set it toracket-xp-eldoc-function
, that might explain this. Does setting it tonil
fix this problem? Please let me know either way?
Commit 47b9041 in February added support for blueboxes to racket-xp-eldoc-function
. But by default that function is not used.