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
Package on main thread for small rebuilds #8491
Changes from 5 commits
1cc60d3
87b6a98
43847dd
ad39a49
350e01e
ddf8a34
32bef58
d3ec164
cf5b3ff
51f3575
f58e170
8bf905a
1caafeb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,6 +5,7 @@ import type SourceMap from '@parcel/source-map'; | |||||||||||||||
import type {FileSystem} from '@parcel/fs'; | ||||||||||||||||
import type WorkerFarm from '@parcel/workers'; | ||||||||||||||||
import type {PackageManager} from '@parcel/package-manager'; | ||||||||||||||||
import type InternalBundleGraph from '../core/src/BundleGraph'; | ||||||||||||||||
import type { | ||||||||||||||||
Diagnostic, | ||||||||||||||||
Diagnostifiable, | ||||||||||||||||
|
@@ -1754,6 +1755,7 @@ export type PackagingProgressEvent = {| | |||||||||||||||
+type: 'buildProgress', | ||||||||||||||||
+phase: 'packaging', | ||||||||||||||||
+bundle: NamedBundle, | ||||||||||||||||
+bundleGraph?: InternalBundleGraph, | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm I think the main reason why I added this was because the ReporterRunner gets the BundleGraph from the WorkerFarm, which wouldn't exist in this case since we don't serialize the BundleGraph, so I sent the BundleGraph through the packaging/optimizing events. parcel/packages/core/core/src/ReporterRunner.js Lines 67 to 73 in cf5b3ff
The invariant here also looks like it uses the private BundleGraph type? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should make an internal ReporterEvent type that has this instead? |
||||||||||||||||
|}; | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
|
@@ -1764,6 +1766,7 @@ export type OptimizingProgressEvent = {| | |||||||||||||||
+type: 'buildProgress', | ||||||||||||||||
+phase: 'optimizing', | ||||||||||||||||
+bundle: NamedBundle, | ||||||||||||||||
+bundleGraph?: InternalBundleGraph, | ||||||||||||||||
|}; | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
|
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.
Not sure if I got this logic quite right.. are there any other cases to look for here?
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.
I'm not sure either, but I'm confused that the comment says "can't skip all the bundles = at least 1 bundle can't be skipped" but then the if condition checks "there are at least 2 bundles which can't be skipped".