Skip to content

Svelte 5: next43 -> next44: can't convert symbol to string #10372

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

Closed
dm-de opened this issue Feb 1, 2024 · 1 comment · Fixed by #10464
Closed

Svelte 5: next43 -> next44: can't convert symbol to string #10372

dm-de opened this issue Feb 1, 2024 · 1 comment · Fixed by #10464
Assignees
Labels
Milestone

Comments

@dm-de
Copy link

dm-de commented Feb 1, 2024

Describe the bug

Possible related to this: #10343

This adds new bug to Svelte 5

Reproduction

Click on any button - and you get many errors

See Item.svelte HTML comment. This line produce error.

LINK

Logs

Uncaught TypeError: can't convert symbol to string

readonly_error playground:output:335
proxy playground:output:86
set playground:output:241
foo playground:output:3415
batch_inspect playground:output:558
on_click playground:output:3370
handle_event_propagation playground:output:2279

System Info

running Svelte compiler version 5.0.0-next.44

Severity

blocking an upgrade

@dummdidumm dummdidumm added this to the 5.0 milestone Feb 2, 2024
@dummdidumm dummdidumm added the bug label Feb 2, 2024
@dummdidumm dummdidumm self-assigned this Feb 2, 2024
dummdidumm added a commit that referenced this issue Feb 2, 2024
The readonly dev time validation results in false-negative object equality checks: The original object is proxified and thus comparisons could be between the unproxified and proxified version, which will always return false. Fixes #10372

There's also the problem that an object could be passed into a component but then passed upwards into shared state. At that point, it should no longer be readonly, but it's not possible to statically analyze these points. Fixes #10372

Lastly, the each block logic mutates an internal array and that also throws errors with the readonly logic. Fixes #10037
@evnix
Copy link

evnix commented Feb 19, 2024

I upgraded from next.37 to next.59

and got the same error,
image

as mentioned, we can't do an upgrade

@Rich-Harris Rich-Harris linked a pull request Feb 20, 2024 that will close this issue
11 tasks
Rich-Harris added a commit that referenced this issue Feb 20, 2024
* fix: remove readonly validation

The readonly dev time validation results in false-negative object equality checks: The original object is proxified and thus comparisons could be between the unproxified and proxified version, which will always return false. Fixes #10372

There's also the problem that an object could be passed into a component but then passed upwards into shared state. At that point, it should no longer be readonly, but it's not possible to statically analyze these points. Fixes #10372

Lastly, the each block logic mutates an internal array and that also throws errors with the readonly logic. Fixes #10037

* reinstate tests

* track ownership of state and mutations

* working?

* remove old changeset

* tidy

* error

* simplify

* fix

* fix

* fix

* tidy

* make it a warning

* rename test

* remove unused test

* update tests

* slap ts-expect-error everywhere, because its too finicky otherwise

* oops

* oh no the hall monitor is here

* only call add_owner in dev

* only owners can transfer ownership

* simplify

* fixes

* tidy up

* fix type error

* while we're at it

* rename file

* rename functions

* add some comments

* move ownership checking logic

* ugh eslint

* more detailed message

* only add filename in dev

* comment

* update tests

* move more code

* undo change to sourcemap tests

* allow proxy to have multiple owners

* use SignalDebug

* i was doing this all wrong

* tidy up

* implement inheritance

* fix

* tidy up

* update filename stuff

* changeset

---------

Co-authored-by: Simon Holthausen <[email protected]>
Co-authored-by: Rich Harris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants