-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Red Knot Playground #12681
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
Red Knot Playground #12681
Conversation
90cf86e
to
0bf44b7
Compare
1fa1770
to
f2582fd
Compare
CodSpeed Performance ReportMerging #12681 will not alter performanceComparing Summary
|
|
4d4c5c8
to
faf316b
Compare
Hey! Any updates about this? Do we have any sort of playground for red knot at the moment? |
No, there's no update. This is blocked on adding WASM support to salsa. See https://salsa.zulipchat.com/#narrow/stream/333573-Contributing-to-Salsa/topic/WASM.20support |
I plan to pick this up again on the side. It's now unblocked as we use salsa's new fixpoint infrastructure that doesn't rely on panics to resolve cycles. |
c5e07db
to
f75f360
Compare
This comment was marked as resolved.
This comment was marked as resolved.
4be75de
to
c5b9398
Compare
|
c5b9398
to
370fa9e
Compare
370fa9e
to
2f7c8e3
Compare
* main: [playground] Avoid concurrent deployments (#16834) [red-knot] Infer `lambda` return type as `Unknown` (#16695) [red-knot] Move `name` field on parameter kind (#16830) [red-knot] Emit errors for more AST nodes that are invalid (or only valid in specific contexts) in type expressions (#16822) [playground] Use cursor for clickable elements (#16833) [red-knot] Deploy playground on main (#16832) Red Knot Playground (#12681) [syntax-errors] PEP 701 f-strings before Python 3.12 (#16543)
Summary
This PR adds a playground for Red Knot
Screencast.from.2024-08-14.10-33-54.webm
Sharing does work 😆 I just forgot to start wrangler.
It supports:
Future extensions:
pyproject.toml
would just be another file.Blockers
Salsa usescatch_unwind
to break cycles, which Red Knot uses extensively when inferring types in the standard library.However, WASM (at least
wasm32-unknown-unknown
) doesn't supportcatch_unwind
today, so the playground always crashes when the type inference encounters a cycle.I created a discussion in the salsa zulip to see if it would be possible to not use catch unwind to break cycles.Rust tracking issue for WASM catch unwind supportI tried to build the WASM with the nightly compiler option but ran into problems because wasm-bindgen doesn't support WASM-exceptions. We could try to write the binding code by hand.Another alternative is to usewasm32-unknown-emscripten
but it's rather painful to build