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: ensure inline object literals are correctly serialised #14325

Merged
merged 4 commits into from
Nov 16, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Nov 16, 2024

Fixes #14324

Copy link

changeset-bot bot commented Nov 16, 2024

🦋 Changeset detected

Latest commit: 1c4596d

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

@Rich-Harris
Copy link
Member

preview: https://svelte-dev-git-preview-svelte-14325-svelte.vercel.app/

this is an automated message

Copy link
Contributor

Playground

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

Copy link
Member

@Rich-Harris Rich-Harris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a deeper disconnect somewhere that was either introduced or exposed by #14269 — if is_pure returns the 'wrong' value then it should affect what happens in the template and what happens in the init block, not just one or the other — this case still fails

Copy link
Member

@Rich-Harris Rich-Harris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving since it's a nasty bug and we need to release a fix quickly, but i'm still very nervous about the fact that this bug arose. this feels like a workaround (a good and welcome workaround, since it extends the is_pure optimisation to more cases) rather than a fix for the deeper issue, which is that it's apparently possible for sequences to show up in neither the template nor the init block. we'll need to investigate why this happens

@trueadm trueadm merged commit 3a69b4c into main Nov 16, 2024
11 checks passed
@trueadm trueadm deleted the inline-expression-fix branch November 16, 2024 17:10
@github-actions github-actions bot mentioned this pull request Nov 16, 2024
@paoloricciuti
Copy link
Member

approving since it's a nasty bug and we need to release a fix quickly, but i'm still very nervous about the fact that this bug arose. this feels like a workaround (a good and welcome workaround, since it extends the is_pure optimisation to more cases) rather than a fix for the deeper issue, which is that it's apparently possible for sequences to show up in neither the template nor the init block. we'll need to investigate why this happens

When I initially worked on that issue it was very intricate because there are multiple reasons to include or not something in the template, if it's, dynamic, if it's only a single text, if it's pure, if it's static. So this specific part of the codebase is extremely interconnected.

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.

Text expression with function calls aren't displayed in paragraph
3 participants