-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Don't discard invalidations when transformer throws an error #7547
Conversation
|
Benchmark ResultsKitchen Sink ✅
Timings
Cold Bundles
Cached Bundles
React HackerNews ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. AtlasKit Editor ✅
Timings
Cold BundlesNo bundle changes detected. Cached Bundles
Three.js ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. |
Somehow returning the ThrowableDiagnostic object as opposed to throwing it strips the |
7e4572f
to
d9a55b7
Compare
Turns out that when throwing an error the worker farm automatically serializes
and deserializes parcel/packages/core/workers/src/WorkerFarm.js Lines 337 to 339 in 4745cd3
the ThrowableDiagnostic. So I'm doing that manually now for that added error property on the return value.
|
Would love to test this out. Anyway I can help? |
Benchmark ResultsKitchen Sink ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. React HackerNews ✅
Timings
Cold BundlesNo bundle changes detected. Cached Bundles
AtlasKit Editor ✅
Timings
Cold Bundles
Cached BundlesNo bundle changes detected. Three.js ✅
Timings
Cold BundlesNo bundle changes detected. Cached Bundles
|
Great, thank you so much folks <3 Do we have an idea when this will be released? Edit: Sorry, I just realized it shipped along v2.2.1 already. And… it solved the very last issue I had with Parcel v2 🎉 You're amazing, keep up the good work 👍 🙏 |
Thanks for your efforts! Did some testing with parcel 2.2.1 and a small Elm app (https://github.com/objarni/KataDB/ ) with following setup:
Observations using Sublime Text's Ctrl+S to save and Firefox browser:
Hypothesis: hotreloading works for html files and the "first" Elm file (Main.elm), but not dependent .elm files like KataDb. |
@objarni I imagine hot reloading would keep the current model and swap out update and view. |
@w0rm that makes sense! Do you have any advice on what would trigger a re-init of the model except refreshing page? |
@objarni I think manually refreshing the page is probably acceptable in such cases. It is a non trivial task for the hot reload to tell apart this type of change. |
No invalidation gets added to the graph if
runTransform
throws an error. So instead catch it and return the error along with invalidations that were added along the wayCloses #6124