-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
implement basic side effects optimization #6590
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Ignored Deployments
|
🟢 Turbopack Benchmark CI successful 🟢Thanks |
✅ This change can build |
🟢 CI successful 🟢Thanks |
Linux Benchmark for 24c112bClick to view benchmark
|
self.inner() | ||
.await? | ||
.into_iter() | ||
.map(|&inner| Vc::upcast(InternalCssAssetReference::new(inner))) | ||
.collect(), |
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.
into_iter
and collect
here is kinda confusing
makes it look like inner
returns multiple items instead of an option
same thing in other places in this PR
Linux Benchmark for 7d2bb95Click to view benchmark
|
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.
seems good apart from some missing documentation and convoluted code 🙃
sorry for the individual comments, I often forget to submit reviews if I don't post the comments right away
same |
Linux Benchmark for eb330baClick to view benchmark
|
let inner = self | ||
.inner() | ||
.await? | ||
.context("inner asset should be CSS processable")?; |
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.
still not sure about this, I guess right now this can't happen
but if it does it would just throw a random error not telling you what the inner asset was and why it's not processable
Linux Benchmark for 9212a80Click to view benchmark
|
438eff4
to
e95f73b
Compare
Linux Benchmark for 9e7bbcdClick to view benchmark
|
13d5147
to
d0f389d
Compare
Linux Benchmark for ac33c8aClick to view benchmark
|
### What? Code update for refactoring in vercel/turborepo#6590 Closes PACK-2043
### Description * optimizes reexports for modules that are inside of folders with a package.json that contains `"sideEffects": false` * For named reexports * skips resolving, reading, parsing, transforms, code generation and bundling for unrelated reexports * skips code generation and bundling for the module containing the followed reexport * For star reexports * skips code generation and bundling for unrelated reexports before the followed reexport * skips resolving, reading, parsing, transforms, code generation and bundling for unrelated reexports after the followed reexport * skips code generation and bundling for the module containing the followed reexport Follow-up work: * `sideEffects` in package.json also supports a glob. We need to support that too. * renaming exports is not yet supported. We need to create a naming module for that to avoid effects on the importer side. Closes PACK-2042
### Description * optimizes reexports for modules that are inside of folders with a package.json that contains `"sideEffects": false` * For named reexports * skips resolving, reading, parsing, transforms, code generation and bundling for unrelated reexports * skips code generation and bundling for the module containing the followed reexport * For star reexports * skips code generation and bundling for unrelated reexports before the followed reexport * skips resolving, reading, parsing, transforms, code generation and bundling for unrelated reexports after the followed reexport * skips code generation and bundling for the module containing the followed reexport Follow-up work: * `sideEffects` in package.json also supports a glob. We need to support that too. * renaming exports is not yet supported. We need to create a naming module for that to avoid effects on the importer side. Closes PACK-2042
### Description * optimizes reexports for modules that are inside of folders with a package.json that contains `"sideEffects": false` * For named reexports * skips resolving, reading, parsing, transforms, code generation and bundling for unrelated reexports * skips code generation and bundling for the module containing the followed reexport * For star reexports * skips code generation and bundling for unrelated reexports before the followed reexport * skips resolving, reading, parsing, transforms, code generation and bundling for unrelated reexports after the followed reexport * skips code generation and bundling for the module containing the followed reexport Follow-up work: * `sideEffects` in package.json also supports a glob. We need to support that too. * renaming exports is not yet supported. We need to create a naming module for that to avoid effects on the importer side. Closes PACK-2042
### Description * optimizes reexports for modules that are inside of folders with a package.json that contains `"sideEffects": false` * For named reexports * skips resolving, reading, parsing, transforms, code generation and bundling for unrelated reexports * skips code generation and bundling for the module containing the followed reexport * For star reexports * skips code generation and bundling for unrelated reexports before the followed reexport * skips resolving, reading, parsing, transforms, code generation and bundling for unrelated reexports after the followed reexport * skips code generation and bundling for the module containing the followed reexport Follow-up work: * `sideEffects` in package.json also supports a glob. We need to support that too. * renaming exports is not yet supported. We need to create a naming module for that to avoid effects on the importer side. Closes PACK-2042
Description
"sideEffects": false
Follow-up work:
sideEffects
in package.json also supports a glob. We need to support that too.Closes PACK-2042