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

Using Svelte across compilation units #1328

Closed
dae opened this issue Aug 10, 2021 · 4 comments
Closed

Using Svelte across compilation units #1328

dae opened this issue Aug 10, 2021 · 4 comments

Comments

@dae
Copy link
Member

dae commented Aug 10, 2021

Following on from hgiesel/anki_new_format_pack#2 and sveltejs/svelte#6530

Correct me if I'm wrong @hgiesel, but isn't this a fairly serious problem? The breakage happened in a minor Svelte release, not a major version bump. In the above case you were able to fix it by updating the Svelte version your add-on was using, but think about what will happen when Anki wants to update to a newer Svelte version - we run the risk of breaking any existing Svelte-based add-ons, and add-on authors may need to build again with a new Svelte version just to fix things.

I'd previously thought that perhaps we could work around it by providing the Svelte files so that users could include them in their add-on compilation process, but I presume that would not help in this case? If Svelte expects all files to be compiled with the same compiler in a single compile step, it seems like the approach we have is not going to be viable.

@dae
Copy link
Member Author

dae commented Aug 10, 2021

Oh, I've just need you've posted #1327 while I was writing this :-) I've only given it a quick scan so far, but a quick question - does this solve the problem with differing compiler versions, or is it only targeted at resolving the binding issues mentioned in the svelte repo ticket?

@hgiesel
Copy link
Contributor

hgiesel commented Aug 10, 2021

The PR is adressing the binding issue, not the issue with differing compiler versions.

Looking at sveltejs/svelte#6584, it seems to me that we're not the only ones affected and that this kind of breaking after a minor version is not common. In fact, the people in the issue seem to have the same use case as we do: combining different compilation units.

However it is worrying that after 13 days, no Svelte maintainer has answered to the proposed solution in this issue yet.

@hgiesel
Copy link
Contributor

hgiesel commented Aug 10, 2021

Also one thing to keep in mind: The error caused in hgiesel/anki_new_format_pack#2, was due to the add-on using a newer Svelte version, compared to Anki 2.1.46, not the other way around.
Quickly testing Anki with the newest Svelte version (from #1327) against the updated New Format Pack does not show the same issue.

@dae
Copy link
Member Author

dae commented Aug 10, 2021

Thanks, that is a relief to hear

@dae dae closed this as completed in 1495fdf Aug 24, 2021
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