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

Small tree shaking fix and test case update #8347

Merged
merged 7 commits into from
Jun 7, 2024
Merged

Small tree shaking fix and test case update #8347

merged 7 commits into from
Jun 7, 2024

Conversation

sokra
Copy link
Member

@sokra sokra commented Jun 6, 2024

Description

avoid adding module evaluation to internal part imports
add a broken test case
update split-chunk test case to work and be more clear

Testing Instructions

Copy link

vercel bot commented Jun 6, 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 7, 2024 5:13am
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 7, 2024 5:13am
8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2024 5:13am
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2024 5:13am
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2024 5:13am
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2024 5:13am
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2024 5:13am
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2024 5:13am
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2024 5:13am
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2024 5:13am

Comment on lines 25 to 33
## Item 3: Stmt 2, `Normal`

```js
export { dog as DOG, cat };

```

- Side effects
- Reads: `dog`, `cat`
Copy link
Member Author

Choose a reason for hiding this comment

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

@kdy1 The whole statement is pretty wrong.

It should not have side effects. It should not read vars. It shouldn't exist at all.

Copy link
Member

Choose a reason for hiding this comment

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

But if it does not exist, dependency graph will be wrong I think

Comment on lines 134 to 138
## Part 1
```js
export { DOG as DOG };

```
Copy link
Member Author

@sokra sokra Jun 6, 2024

Choose a reason for hiding this comment

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

@kdy1 This looks weird. It should import dog shouldn't it?

Copy link
Contributor

github-actions bot commented Jun 6, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented Jun 6, 2024

✅ This change can build next-swc

@sokra sokra requested a review from kdy1 June 6, 2024 08:53
Copy link
Contributor

github-actions bot commented Jun 6, 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 7, 2024
@sokra sokra merged commit 8950fd9 into main Jun 7, 2024
54 of 55 checks passed
@sokra sokra deleted the sokra/tree-shake branch June 7, 2024 05:32
sokra added a commit to vercel/next.js that referenced this pull request Jun 7, 2024
* vercel/turborepo#8347 <!-- Tobias Koppers - Small
tree shaking fix and test case update -->
* vercel/turborepo#8348 <!-- Donny/강동윤 - fix: Apply
`paren-remover` while minifying -->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

avoid adding module evaluation to internal part imports
add a broken test case
update split-chunk test case to work and be more clear

### 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
### Description

avoid adding module evaluation to internal part imports
add a broken test case
update split-chunk test case to work and be more clear

### 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
### Description

avoid adding module evaluation to internal part imports
add a broken test case
update split-chunk test case to work and be more clear

### 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
### Description

avoid adding module evaluation to internal part imports
add a broken test case
update split-chunk test case to work and be more clear

### 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 16, 2024
* vercel/turborepo#8347 <!-- Tobias Koppers - Small
tree shaking fix and test case update -->
* vercel/turborepo#8348 <!-- Donny/강동윤 - fix: Apply
`paren-remover` while minifying -->
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