Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
0f47638f
Unverified
Commit
0f47638f
authored
Feb 24, 2025
by
Donny/강동윤
Committed by
GitHub
Feb 24, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(turbopack): Fix pure span check in advanced tree shaking (#76406)
parent
7361dc46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
graph.rs
...opack/crates/turbopack-ecmascript/src/tree_shake/graph.rs
+5
-2
No files found.
turbopack/crates/turbopack-ecmascript/src/tree_shake/graph.rs
View file @
0f47638f
...
@@ -10,7 +10,7 @@ use petgraph::{
...
@@ -10,7 +10,7 @@ use petgraph::{
};
};
use
rustc_hash
::{
FxHashMap
,
FxHashSet
};
use
rustc_hash
::{
FxHashMap
,
FxHashSet
};
use
swc_core
::{
use
swc_core
::{
common
::{
comments
::
Comments
,
util
::
take
::
Take
,
Spanned
,
SyntaxContext
,
DUMMY_SP
},
common
::{
comments
::
Comments
,
util
::
take
::
Take
,
BytePos
,
Spanned
,
SyntaxContext
,
DUMMY_SP
},
ecma
::{
ecma
::{
ast
::{
ast
::{
op
,
ClassDecl
,
Decl
,
DefaultDecl
,
EsReserved
,
ExportAll
,
ExportDecl
,
op
,
ClassDecl
,
Decl
,
DefaultDecl
,
EsReserved
,
ExportAll
,
ExportDecl
,
...
@@ -1222,7 +1222,10 @@ impl DepGraph {
...
@@ -1222,7 +1222,10 @@ impl DepGraph {
ids
.push
(
id
.clone
());
ids
.push
(
id
.clone
());
let
has_explicit_pure
=
match
&
decl
.init
{
let
has_explicit_pure
=
match
&
decl
.init
{
Some
(
e
)
=>
comments
.has_flag
(
e
.span
()
.lo
,
"PURE"
),
Some
(
e
)
=>
{
e
.span
()
.lo
==
BytePos
::
PURE
||
comments
.has_flag
(
e
.span
()
.lo
,
"PURE"
)
}
_
=>
false
,
_
=>
false
,
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment