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

Tree Shaking grouping of items #8420

Merged
merged 43 commits into from
Jun 17, 2024
Merged

Tree Shaking grouping of items #8420

merged 43 commits into from
Jun 17, 2024

Conversation

sokra
Copy link
Member

@sokra sokra commented Jun 11, 2024

Description

add test case

Testing Instructions

Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 8:02am
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 8:02am
8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jun 17, 2024 8:02am
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jun 17, 2024 8:02am
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jun 17, 2024 8:02am
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jun 17, 2024 8:02am
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jun 17, 2024 8:02am
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jun 17, 2024 8:02am
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jun 17, 2024 8:02am
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jun 17, 2024 8:02am


export { x };

export const y = x;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this line fixes the problem

Copy link
Contributor

github-actions bot commented Jun 11, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented Jun 11, 2024

✅ This change can build next-swc

Comment on lines 288 to 359
x = 2;
export { x } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
};
Copy link
Member Author

@sokra sokra Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should import x

Comment on lines 323 to 381
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 4
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 5
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 4
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 5
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6
};

These are not necessary. It only need to import the last Write to a variable. And the declaration of it

Comment on lines 297 to 299
export { x } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it's wrong that a module exports a variable that it didn't declare.

Copy link
Contributor

github-actions bot commented Jun 11, 2024

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

@kdy1 kdy1 self-assigned this Jun 11, 2024
@kdy1 kdy1 force-pushed the sokra/tree-shaking-grouping branch from cec53bc to f7b632b Compare June 12, 2024 05:20
@sokra sokra merged commit e712b19 into main Jun 17, 2024
54 of 55 checks passed
@sokra sokra deleted the sokra/tree-shaking-grouping branch June 17, 2024 08:08
kdy1 added a commit to vercel/next.js that referenced this pull request Jun 18, 2024
# Turbopack

* vercel/turborepo#8473 <!-- Donny/강동윤 - feat: Check
the number of direct dependants while tree shaking -->
* vercel/turborepo#8420 <!-- Tobias Koppers - Tree
Shaking grouping of items -->
* vercel/turborepo#8510 <!-- Tobias Koppers - read
larger chunks when reading a trace file -->
* vercel/turborepo#8509 <!-- Tobias Koppers - avoid
duplicates in primary_modules -->
* vercel/turborepo#8508 <!-- Tobias Koppers - only
create spans for nodes that are actually visited -->
* vercel/turborepo#8502 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.95.2` -->


### What?

Update `swc_core`.

- [CHANGELOG](https://github.com/swc-project/swc/blob/064af5391d8da9599f277bd68fd0b479b0b1235c/CHANGELOG.md#160---2024-06-15)


### Why?

I improved the performance of the parser by margin.
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
…orepo#8472)

### Description

Extracted from vercel/turborepo#8420 to split diffs
for optimization vs intuitiveness

### Testing Instructions

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

add test case

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
…orepo#8472)

### Description

Extracted from vercel/turborepo#8420 to split diffs
for optimization vs intuitiveness

### Testing Instructions

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

add test case

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
…orepo#8472)

### Description

Extracted from vercel/turborepo#8420 to split diffs
for optimization vs intuitiveness

### Testing Instructions

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

add test case

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
…orepo#8472)

### Description

Extracted from vercel/turborepo#8420 to split diffs
for optimization vs intuitiveness

### Testing Instructions

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
### Description

add test case

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 14, 2024
* vercel/turborepo#8473 <!-- Donny/강동윤 - feat: Check
the number of direct dependants while tree shaking -->
* vercel/turborepo#8420 <!-- Tobias Koppers - Tree
Shaking grouping of items -->
* vercel/turborepo#8510 <!-- Tobias Koppers - read
larger chunks when reading a trace file -->
* vercel/turborepo#8509 <!-- Tobias Koppers - avoid
duplicates in primary_modules -->
* vercel/turborepo#8508 <!-- Tobias Koppers - only
create spans for nodes that are actually visited -->
* vercel/turborepo#8502 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.95.2` -->

Update `swc_core`.

- [CHANGELOG](https://github.com/swc-project/swc/blob/064af5391d8da9599f277bd68fd0b479b0b1235c/CHANGELOG.md#160---2024-06-15)

I improved the performance of the parser by margin.
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 15, 2024
* vercel/turborepo#8473 <!-- Donny/강동윤 - feat: Check
the number of direct dependants while tree shaking -->
* vercel/turborepo#8420 <!-- Tobias Koppers - Tree
Shaking grouping of items -->
* vercel/turborepo#8510 <!-- Tobias Koppers - read
larger chunks when reading a trace file -->
* vercel/turborepo#8509 <!-- Tobias Koppers - avoid
duplicates in primary_modules -->
* vercel/turborepo#8508 <!-- Tobias Koppers - only
create spans for nodes that are actually visited -->
* vercel/turborepo#8502 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.95.2` -->

Update `swc_core`.

- [CHANGELOG](https://github.com/swc-project/swc/blob/064af5391d8da9599f277bd68fd0b479b0b1235c/CHANGELOG.md#160---2024-06-15)

I improved the performance of the parser by margin.
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 16, 2024
# Turbopack

* vercel/turborepo#8473 <!-- Donny/강동윤 - feat: Check
the number of direct dependants while tree shaking -->
* vercel/turborepo#8420 <!-- Tobias Koppers - Tree
Shaking grouping of items -->
* vercel/turborepo#8510 <!-- Tobias Koppers - read
larger chunks when reading a trace file -->
* vercel/turborepo#8509 <!-- Tobias Koppers - avoid
duplicates in primary_modules -->
* vercel/turborepo#8508 <!-- Tobias Koppers - only
create spans for nodes that are actually visited -->
* vercel/turborepo#8502 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.95.2` -->


### What?

Update `swc_core`.

- [CHANGELOG](https://github.com/swc-project/swc/blob/064af5391d8da9599f277bd68fd0b479b0b1235c/CHANGELOG.md#160---2024-06-15)


### Why?

I improved the performance of the parser by margin.
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

Successfully merging this pull request may close these issues.

2 participants