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

convert REPL to Svelte 5 #49

Closed
wants to merge 7 commits into from
Closed

convert REPL to Svelte 5 #49

wants to merge 7 commits into from

Conversation

Rich-Harris
Copy link
Member

WIP. I want to get rid of the run calls — they should just be $effect — but changing them breaks everything in incomprehensible ways

Copy link

vercel bot commented Jun 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 25, 2024 4:21pm

@Rich-Harris
Copy link
Member Author

hmm this appears to have broken svelte-split-pane. investigating

@Rich-Harris
Copy link
Member Author

gah this is failing in strange ways. gonna redo it from scratch, more carefully

@Rich-Harris Rich-Harris deleted the svelte-5-repl branch June 25, 2024 16:34
@dummdidumm
Copy link
Member

Did it break when everything was using run, or just after moving them to $effect?
If the former that's a bit concerning. If the latter and if you figure out why it happened, would that be something to add to some sort of migration docs?

@Rich-Harris
Copy link
Member Author

it was weird as hell — the moment I changed a run to an $effect, everything in my IDE went haywire. variables were erroneously marked as unused, red squigglies all over the place... it hinted at something deeply broken

@dummdidumm
Copy link
Member

dummdidumm commented Jun 25, 2024

Mhhhm but that sounds more like a language-tools issue, no?
Is this reproducible within this PR? Like, "go to commit 3, everything fine, change run in file X to $effect, see everything break". And/or is this visible in the last commit of this branch? i.e. "restore the branch, open file X, see that everything's broken in the IDE"?

@Rich-Harris
Copy link
Member Author

this should illustrate it — migrate CodeMirror.svelte, replace the first run with $effect, see the entire thing go haywire

weird-shit.mov

@dummdidumm dummdidumm restored the svelte-5-repl branch June 26, 2024 07:54
@dummdidumm dummdidumm deleted the svelte-5-repl branch June 26, 2024 08:46
@dummdidumm
Copy link
Member

dummdidumm commented Jun 26, 2024

Thanks - this is a language tools bug. There's an effect declaration somewhere in a function and it's wrongfully counted as a store declaration. That in combination with $effect then leads to some store declaration code being emitted which fucks everything up. Fix here: sveltejs/language-tools#2422

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

Successfully merging this pull request may close these issues.

2 participants