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

Bitmask-based change tracking breaks svelte-devtools #4041

Closed
RedHatter opened this issue Dec 2, 2019 · 3 comments
Closed

Bitmask-based change tracking breaks svelte-devtools #4041

RedHatter opened this issue Dec 2, 2019 · 3 comments

Comments

@RedHatter
Copy link
Contributor

RedHatter commented Dec 2, 2019

The new bitmask-based change tracking in version 3.16, while great, causes an issue with svelte-devtools. Now that the ctx object is a simple array I have no way to map the values back to their original names.

For example, previously a user might see something like this

State
string: "testing"
number: 5

Now in 3.16 they would instead see

State
0: "testing"
1: 5

One possible solution could be to expose some sort of map from ctx index to local name in dev mode.

RedHatter pushed a commit to RedHatter/svelte that referenced this issue Dec 3, 2019
@Conduitry
Copy link
Member

Would this be better solved by something like #3822? I feel like we should have some official dev-only API for this, and not add a lookup that tells you how to interpret another private API.

@RedHatter
Copy link
Contributor Author

RedHatter commented Dec 3, 2019

Yeah that would both work, and would be simpler.

Though I feel like I should point out that svelte-devtools uses many private APIs. Having an official api for accessing internal ctx isn't going to change that.

@Conduitry
Copy link
Member

Closing this in favor of #3822, which feels like it's getting pretty close to done now.

Re: using private APIs - understood, but I think there's still definitely value in gradually moving toward official APIs where it makes sense.

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

No branches or pull requests

2 participants