-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: lazily create sources for Set #11946
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
fix: lazily create sources for Set #11946
Conversation
🦋 Changeset detectedLatest commit: 29cae71 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
We don't want to do this. Instead we need to do the same thing as what Map does for reading all keys. |
Wait but aren't the sources needed for every element of the set anyway? If those were added one by one they would have their own source right? |
That doesn't mean they're reactive. They're only reactive when activated. |
Yeah but isn't
Are you saying the whole |
Oh or maybe you are saying to add a |
Spot on |
Tbh we don’t need to create a signal here either really. We can just do it lazy in has and get_all |
Ok I will work on this tomorrow (but feel free to "hijack" the pr if you want) |
@trueadm this should do it, tests are passing...my only doubt is if i'm over "reading all"...i've used the method in every read method, keys, values and entries. Given that keys is used by the iterator removing it there make literally tests fail and i assume you still want to read all for entries and values and all the read methods. Let me know if i fumbled 😄 |
I've closed #11952 as a duplicate of the original issue - Do we feel like the test added here suffices to cover that case? I'm guessing so, because of its use of |
It should be...if you approve the deploy on vercel we can check 😄 |
Can confirm this solves #11952, thanks! |
I had pulled down this branch and ran the REPL locally because I closed #11952, and reproduction in that issue seemed to be behaving correctly. My concern was specifically about regression tests, and whether we felt that the adjustments to the automated test sufficiently covered |
I'll add size too :) |
Dammit, I was about to open an alternative PR. I was looking more closely at this and I don't think it's the right fix. Reverting |
This reverts commit 48fa658.
Svelte 5 rewrite
Closes #11939
i think this time i did the right thing and didn't fuck up like for the
Map
😄Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (
main
).If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is
svelte-4
and notmain
.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint