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: export add snippet symbol func #12008

Closed
wants to merge 1 commit into from

Conversation

azat-io
Copy link
Contributor

@azat-io azat-io commented Jun 12, 2024

Hello!

Astro uses add_snippet_symbol func: https://github.com/withastro/astro/blob/main/packages/integrations/svelte/client-v5.js#L2

When I use the latest version of Svelte 5 with Astro I get an error:

12:19:22 [ERROR] [UnhandledRejection] Astro detected an unhandled rejection. Here's the stack trace:
Error: Build failed with 1 error:
node_modules/.pnpm/@[email protected][email protected]_@[email protected][email protected][email protected]_type_45aq3zregi4esy5helmin3cl6q/node_modules/@astrojs/svelte/client-v5.js:2:9: ERROR: No matching export in "node_modules/.pnpm/[email protected]/node_modules/svelte/src/internal/client/index.js" for import "add_snippet_symbol"
    at failureErrorWithLog (/Users/azat/Developer/eslint-plugin-perfectionist/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1651:15)
    at /Users/azat/Developer/eslint-plugin-perfectionist/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1059:25
    at /Users/azat/Developer/eslint-plugin-perfectionist/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1527:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

This export was removed in this PR: 4365562

Please bring back the export of this feature so that you can use Svelte 5 with Astro.

Issue in Astro: withastro/astro#11149

Copy link

changeset-bot bot commented Jun 12, 2024

⚠️ No Changeset found

Latest commit: b8eda2b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@azat-io
Copy link
Contributor Author

azat-io commented Jun 13, 2024

@Rich-Harris @Conduitry Hello! Could you please preview this PR?
Without this, we cannot use Svelte 5 with Astro. 😢

@Rich-Harris
Copy link
Member

We're aware of the issue, but this isn't the solution we plan to go with. We don't want people using private APIs as these are subject to change without warning. We have a rough design for a solution that we think would work for Astro but we haven't had a chance to test it out yet — more soon

@azat-io
Copy link
Contributor Author

azat-io commented Jun 13, 2024

@Rich-Harris It's cool, and it's the right thing to do. Thanks for the explanation.
But maybe we should still merge the current PR as a temporary solution? Currently, Astro can't use Svelte 5 at all.

@azat-io
Copy link
Contributor Author

azat-io commented Jun 24, 2024

@Rich-Harris My suggestion:

  • merge this pull request and give the option to use Svelte 5 with Astro
  • create an issue in Svelte repo about this problem with private API usage
  • specify this pull request in Svelte's new issue as the one to be reverted in future

This is a critical issue. Unfortunately, this problem makes it impossible to release our project.

Currently Astro cannot use Svelte 5 at all. Please give us a temporary solution to the problem. 🙏

@nzoschke
Copy link

As a temporary workaround an older version works with Astro... npm install --save-dev [email protected]

@azat-io
Copy link
Contributor Author

azat-io commented Jun 24, 2024

@nzoschke I need one fix that came in v5.0.0-next.153.
Unfortunately, your suggestion doesn't suit me at all.

@matthewp
Copy link

cc @bluwy i'm not sure if the integration was ever working with Svelte 5 or not. If so can we revert using this symbol?

@kenedyolisi
Copy link

cc @bluwy i'm not sure if the integration was ever working with Svelte 5 or not. If so can we revert using this symbol?

I am working on a project using Astro and svelte integration. It works with svelte 5 but breaks after v5.0.0-next.133. I have also been waiting for this to be fixed.

@KameiKojirou
Copy link

Broken for me as well. I'm currently using the latest version 5.0.0-next.166.

@7nik
Copy link

7nik commented Jul 1, 2024

Can stealing the symbol be a temporary solution?

@trueadm
Copy link
Contributor

trueadm commented Jul 11, 2024

Closing this in favour of #12409.

@trueadm trueadm closed this Jul 11, 2024
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.

8 participants