- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.1k
feat: forking #14793
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
feat: forking #14793
Conversation
| 🦋 Changeset detectedLatest commit: 66761b9 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 | 
| Alright, I think this is ready. No tests because I'm under time pressure... and in any case we will likely want to overhaul the implementation for SvelteKit 3, as things will look different (and more fine-grained) in future. For example we will be able to maintain multiple forks simultaneously, rather than being limited to one as we are today. But I've tested locally and it works beautifully | 
| }; | ||
|  | ||
| if (svelte.fork) { | ||
| load_cache.fork = load_cache.promise.then((result) => { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is waiting for promise to assign to load_cache.fork but in promise we could call discard_load_cache that should clear load_cache.fork in case of an error. Wouldn't this leak fork in case of an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh great catch! pushed a fix
WIP. counterpart to sveltejs/svelte#17004
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits