Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tolerate broken Typed Racket #457

Open
greghendershott opened this issue Apr 29, 2020 · 4 comments
Open

Tolerate broken Typed Racket #457

greghendershott opened this issue Apr 29, 2020 · 4 comments

Comments

@greghendershott
Copy link
Owner

@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 (using dynamic-require and/or with-handlers) such that the front end racket-xp-mode could disable or limit itself in a more-graceful way.
@greghendershott
Copy link
Owner Author

@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
Copy link
Sponsor Contributor

samth commented Apr 29, 2020

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

@greghendershott
Copy link
Owner Author

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
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants