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

fix: when re-connecting unowned deriveds, remove their unowned flag #15255

Merged
merged 13 commits into from
Feb 11, 2025

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Feb 10, 2025

Fixes #15229.
Fixes #15180.

Where we know that an unowned that was temporarily made unowned, and has definitely become owned again, we can remove the unowned flag entirely. This is the inverse of the logic that makes the derived temporarily unowned to begin with.

Copy link

changeset-bot bot commented Feb 10, 2025

🦋 Changeset detected

Latest commit: 8a952ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

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

Copy link
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@15255

@techniq
Copy link

techniq commented Feb 10, 2025

Thanks @trueadm, you're amazing! This resolves the 4 LayerChart regressions identified in techniq/layerchart#384 (tested locally with pnpm add https://pkg.pr.new/svelte@15255)

@Leonidaz
Copy link

this pr also fixes #15180

@trueadm trueadm changed the title fix: when an unowned derived is tracked again, remove unowned flag fix: alter heuristic for reading data eagerly in props handling Feb 10, 2025
@trueadm
Copy link
Contributor Author

trueadm commented Feb 10, 2025

@Leonidaz @techniq, I changed the PR to opt for a slightly simpler strategy, can you both please re-test and let me know if things still are resolved?

@Leonidaz
Copy link

just tested, @trueadm as of 2957e6c, #15180 again appears to be broken.

@techniq
Copy link

techniq commented Feb 10, 2025

@trueadm all regressions appear to still be fixed after re-running pnpm add https://pkg.pr.new/svelte@15255

@Leonidaz
Copy link

just tested, @trueadm as of 2957e6c, #15180 again appears to be broken.

if it helps this is the last commit that made it work: b054746

@trueadm trueadm changed the title fix: alter heuristic for reading data eagerly in props handling fix: when re-connecting unowned deriveds, remove their unowned flag Feb 10, 2025
@trueadm
Copy link
Contributor Author

trueadm commented Feb 10, 2025

The simplification on props actually introduced other issues, so the previous fix was indeed correct. Thanks for you help!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@trueadm trueadm merged commit b602c59 into main Feb 11, 2025
10 checks passed
@trueadm trueadm deleted the fix-unowned-6 branch February 11, 2025 13:02
@github-actions github-actions bot mentioned this pull request Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants