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
a57e4e80
Unverified
Commit
a57e4e80
authored
Jan 26, 2026
by
Tobias Koppers
Committed by
GitHub
Jan 26, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: remove Asset supertrait from Module trait. Modules don't have content (#86416)
Reverts vercel/next.js#86415
parent
c26b4a68
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
98 additions
and
330 deletions
+98
-330
ecmascript_client_reference_module.rs
...pt_client_reference/ecmascript_client_reference_module.rs
+1
-13
dynamic_module.rs
crates/next-core/src/next_dynamic/dynamic_module.rs
+0
-14
server_component_module.rs
...core/src/next_server_component/server_component_module.rs
+1
-16
server_utility_module.rs
...ext-core/src/next_server_utility/server_utility_module.rs
+1
-14
swc_ecma_transform_plugins.rs
.../src/next_shared/transforms/swc_ecma_transform_plugins.rs
+12
-2
raw_ecmascript_module.rs
crates/next-core/src/raw_ecmascript_module.rs
+1
-9
postcss.config.mjs
test/e2e/app-dir/tailwind-css/postcss.config.mjs
+10
-0
postcss.config.cjs
test/e2e/postcss-config-cjs/app/postcss.config.cjs
+4
-0
changed.rs
turbopack/crates/turbopack-core/src/changed.rs
+13
-2
evaluate.rs
turbopack/crates/turbopack-core/src/chunk/evaluate.rs
+1
-2
mod.rs
turbopack/crates/turbopack-core/src/chunk/mod.rs
+2
-2
module.rs
turbopack/crates/turbopack-core/src/introspect/module.rs
+6
-2
module.rs
turbopack/crates/turbopack-core/src/module.rs
+3
-3
node_addon_module.rs
turbopack/crates/turbopack-core/src/node_addon_module.rs
+0
-9
raw_module.rs
turbopack/crates/turbopack-core/src/raw_module.rs
+0
-9
rebase.rs
turbopack/crates/turbopack-core/src/rebase.rs
+11
-4
traced_asset.rs
turbopack/crates/turbopack-core/src/traced_asset.rs
+11
-4
asset.rs
turbopack/crates/turbopack-css/src/asset.rs
+0
-9
mod.rs
turbopack/crates/turbopack-css/src/chunk/mod.rs
+1
-1
embed.rs
turbopack/crates/turbopack-css/src/embed.rs
+2
-2
module_asset.rs
turbopack/crates/turbopack-css/src/module_asset.rs
+0
-9
module.rs
...ack/crates/turbopack-ecmascript/src/async_chunk/module.rs
+0
-9
placeable.rs
turbopack/crates/turbopack-ecmascript/src/chunk/placeable.rs
+1
-1
inlined_bytes_module.rs
...k/crates/turbopack-ecmascript/src/inlined_bytes_module.rs
+2
-10
lib.rs
turbopack/crates/turbopack-ecmascript/src/lib.rs
+1
-10
chunk_asset.rs
...k/crates/turbopack-ecmascript/src/manifest/chunk_asset.rs
+0
-9
merged_module.rs
turbopack/crates/turbopack-ecmascript/src/merged_module.rs
+0
-9
external_module.rs
...es/turbopack-ecmascript/src/references/external_module.rs
+4
-22
require_context.rs
...es/turbopack-ecmascript/src/references/require_context.rs
+0
-9
module.rs
...-ecmascript/src/side_effect_optimization/facade/module.rs
+0
-12
module.rs
...-ecmascript/src/side_effect_optimization/locals/module.rs
+0
-9
asset.rs
...opack/crates/turbopack-ecmascript/src/tree_shake/asset.rs
+0
-9
side_effect_module.rs
...turbopack-ecmascript/src/tree_shake/side_effect_module.rs
+0
-17
mod.rs
turbopack/crates/turbopack-ecmascript/src/typescript/mod.rs
+1
-9
mod.rs
turbopack/crates/turbopack-ecmascript/src/webpack/mod.rs
+0
-9
module.rs
...ck/crates/turbopack-ecmascript/src/worker_chunk/module.rs
+0
-9
lib.rs
turbopack/crates/turbopack-json/src/lib.rs
+2
-10
postcss.rs
turbopack/crates/turbopack-node/src/transforms/postcss.rs
+7
-5
css.rs
turbopack/crates/turbopack-static/src/css.rs
+0
-9
ecma.rs
turbopack/crates/turbopack-static/src/ecma.rs
+0
-9
module_asset.rs
turbopack/crates/turbopack-wasm/src/module_asset.rs
+0
-9
raw.rs
turbopack/crates/turbopack-wasm/src/raw.rs
+0
-9
No files found.
crates/next-core/src/next_client_reference/ecmascript_client_reference/ecmascript_client_reference_module.rs
View file @
a57e4e80
...
@@ -6,7 +6,7 @@ use turbo_rcstr::{RcStr, rcstr};
...
@@ -6,7 +6,7 @@ use turbo_rcstr::{RcStr, rcstr};
use
turbo_tasks
::{
IntoTraitRef
,
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks
::{
IntoTraitRef
,
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks_fs
::{
File
,
FileContent
};
use
turbo_tasks_fs
::{
File
,
FileContent
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::
{
Asset
,
AssetContent
}
,
asset
::
AssetContent
,
chunk
::{
chunk
::{
AsyncModuleInfo
,
ChunkGroupType
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
AsyncModuleInfo
,
ChunkGroupType
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkableModuleReference
,
ChunkingContext
,
ChunkingType
,
ChunkingTypeOption
,
ChunkableModuleReference
,
ChunkingContext
,
ChunkingType
,
ChunkingTypeOption
,
...
@@ -249,18 +249,6 @@ impl Module for EcmascriptClientReferenceModule {
...
@@ -249,18 +249,6 @@ impl Module for EcmascriptClientReferenceModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
EcmascriptClientReferenceModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
AssetContent
::
File
(
FileContent
::
Content
(
"// This is a proxy module for Next.js client references."
.into
())
.resolved_cell
(),
)
.cell
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
EcmascriptClientReferenceModule
{
impl
ChunkableModule
for
EcmascriptClientReferenceModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
crates/next-core/src/next_dynamic/dynamic_module.rs
View file @
a57e4e80
...
@@ -4,9 +4,7 @@ use anyhow::Result;
...
@@ -4,9 +4,7 @@ use anyhow::Result;
use
indoc
::
formatdoc
;
use
indoc
::
formatdoc
;
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks_fs
::
FileContent
;
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
ModuleChunkItemIdExt
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
ModuleChunkItemIdExt
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -78,18 +76,6 @@ impl Module for NextDynamicEntryModule {
...
@@ -78,18 +76,6 @@ impl Module for NextDynamicEntryModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
NextDynamicEntryModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
AssetContent
::
File
(
FileContent
::
Content
(
"// This is a marker module for Next.js dynamic."
.into
())
.resolved_cell
(),
)
.cell
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
NextDynamicEntryModule
{
impl
ChunkableModule
for
NextDynamicEntryModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
crates/next-core/src/next_server_component/server_component_module.rs
View file @
a57e4e80
...
@@ -4,9 +4,8 @@ use anyhow::Result;
...
@@ -4,9 +4,8 @@ use anyhow::Result;
use
indoc
::
formatdoc
;
use
indoc
::
formatdoc
;
use
turbo_rcstr
::
rcstr
;
use
turbo_rcstr
::
rcstr
;
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks_fs
::
{
FileContent
,
FileSystemPath
}
;
use
turbo_tasks_fs
::
FileSystemPath
;
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
ModuleChunkItemIdExt
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
ModuleChunkItemIdExt
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -94,20 +93,6 @@ impl Module for NextServerComponentModule {
...
@@ -94,20 +93,6 @@ impl Module for NextServerComponentModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
NextServerComponentModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
AssetContent
::
File
(
FileContent
::
Content
(
"// This is a marker module for Next.js server components."
.into
(),
)
.resolved_cell
(),
)
.cell
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
NextServerComponentModule
{
impl
ChunkableModule
for
NextServerComponentModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
crates/next-core/src/next_server_utility/server_utility_module.rs
View file @
a57e4e80
...
@@ -4,9 +4,8 @@ use anyhow::Result;
...
@@ -4,9 +4,8 @@ use anyhow::Result;
use
indoc
::
formatdoc
;
use
indoc
::
formatdoc
;
use
turbo_rcstr
::
rcstr
;
use
turbo_rcstr
::
rcstr
;
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks_fs
::
{
FileContent
,
FileSystemPath
}
;
use
turbo_tasks_fs
::
FileSystemPath
;
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
ModuleChunkItemIdExt
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
ModuleChunkItemIdExt
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -75,18 +74,6 @@ impl Module for NextServerUtilityModule {
...
@@ -75,18 +74,6 @@ impl Module for NextServerUtilityModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
NextServerUtilityModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
AssetContent
::
File
(
FileContent
::
Content
(
"// This is a marker module for Next.js server utilities."
.into
())
.resolved_cell
(),
)
.cell
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
NextServerUtilityModule
{
impl
ChunkableModule
for
NextServerUtilityModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
crates/next-core/src/next_shared/transforms/swc_ecma_transform_plugins.rs
View file @
a57e4e80
...
@@ -68,10 +68,11 @@ pub async fn get_swc_ecma_transform_rule_impl(
...
@@ -68,10 +68,11 @@ pub async fn get_swc_ecma_transform_rule_impl(
enable_mdx_rs
:
bool
,
enable_mdx_rs
:
bool
,
)
->
Result
<
Option
<
ModuleRule
>>
{
)
->
Result
<
Option
<
ModuleRule
>>
{
use
anyhow
::
bail
;
use
anyhow
::
bail
;
use
turbo_tasks
::
TryFlatJoinIterExt
;
use
turbo_tasks
::
{
TryFlatJoinIterExt
,
ValueToString
}
;
use
turbo_tasks_fs
::
FileContent
;
use
turbo_tasks_fs
::
FileContent
;
use
turbopack_core
::{
use
turbopack_core
::{
asset
::
Asset
,
asset
::
Asset
,
module
::
Module
,
reference_type
::{
CommonJsReferenceSubType
,
ReferenceType
},
reference_type
::{
CommonJsReferenceSubType
,
ReferenceType
},
resolve
::{
handle_resolve_error
,
parse
::
Request
,
resolve
},
resolve
::{
handle_resolve_error
,
parse
::
Request
,
resolve
},
};
};
...
@@ -133,7 +134,16 @@ pub async fn get_swc_ecma_transform_rule_impl(
...
@@ -133,7 +134,16 @@ pub async fn get_swc_ecma_transform_rule_impl(
return
Ok
(
None
);
return
Ok
(
None
);
};
};
let
content
=
&*
plugin_module
.content
()
.file_content
()
.await
?
;
let
Some
(
plugin_source
)
=
&*
plugin_module
.source
()
.await
?
else
{
use
anyhow
::
bail
;
bail!
(
"Expected source for plugin module: {}"
,
plugin_module
.ident
()
.to_string
()
.await
?
);
};
let
content
=
&*
plugin_source
.content
()
.file_content
()
.await
?
;
let
FileContent
::
Content
(
file
)
=
content
else
{
let
FileContent
::
Content
(
file
)
=
content
else
{
bail!
(
"Expected file content for plugin module"
);
bail!
(
"Expected file content for plugin module"
);
};
};
...
...
crates/next-core/src/raw_ecmascript_module.rs
View file @
a57e4e80
...
@@ -9,7 +9,7 @@ use turbo_tasks::{FxIndexMap, FxIndexSet, ResolvedVc, TryJoinIterExt, ValueToStr
...
@@ -9,7 +9,7 @@ use turbo_tasks::{FxIndexMap, FxIndexSet, ResolvedVc, TryJoinIterExt, ValueToStr
use
turbo_tasks_fs
::{
FileContent
,
rope
::
Rope
};
use
turbo_tasks_fs
::{
FileContent
,
rope
::
Rope
};
use
turbopack
::{
ModuleAssetContext
,
module_options
::
CustomModuleType
};
use
turbopack
::{
ModuleAssetContext
,
module_options
::
CustomModuleType
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::
{
Asset
,
AssetContent
}
,
asset
::
Asset
,
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
code_builder
::
CodeBuilder
,
code_builder
::
CodeBuilder
,
compile_time_info
::{
compile_time_info
::{
...
@@ -103,14 +103,6 @@ impl Module for RawEcmascriptModule {
...
@@ -103,14 +103,6 @@ impl Module for RawEcmascriptModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
RawEcmascriptModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
RawEcmascriptModule
{
impl
ChunkableModule
for
RawEcmascriptModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
test/e2e/app-dir/tailwind-css/postcss.config.js
→
test/e2e/app-dir/tailwind-css/postcss.config.
m
js
View file @
a57e4e80
module
.
exports
=
{
// importing externals should work fine
import
'fs'
import
'path'
export
default
{
plugins
:
{
plugins
:
{
tailwindcss
:
{},
tailwindcss
:
{},
autoprefixer
:
{},
autoprefixer
:
{},
...
...
test/e2e/postcss-config-cjs/app/postcss.config.cjs
View file @
a57e4e80
// importing externals should work fine
require('fs')
require('path')
// If you want to use other PostCSS plugins, see the following:
// If you want to use other PostCSS plugins, see the following:
// https://tailwindcss.com/docs/using-with-preprocessors
// https://tailwindcss.com/docs/using-with-preprocessors
module.exports = {
module.exports = {
...
...
turbopack/crates/turbopack-core/src/changed.rs
View file @
a57e4e80
...
@@ -23,7 +23,7 @@ pub async fn get_referenced_modules(
...
@@ -23,7 +23,7 @@ pub async fn get_referenced_modules(
/// Returns a completion that changes when any content of any asset in the whole
/// Returns a completion that changes when any content of any asset in the whole
/// asset graph changes.
/// asset graph changes.
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
pub
async
fn
any_content_changed_of_module
(
pub
async
fn
any_
source_
content_changed_of_module
(
root
:
ResolvedVc
<
Box
<
dyn
Module
>>
,
root
:
ResolvedVc
<
Box
<
dyn
Module
>>
,
)
->
Result
<
Vc
<
Completion
>>
{
)
->
Result
<
Vc
<
Completion
>>
{
let
completions
=
AdjacencyMap
::
new
()
let
completions
=
AdjacencyMap
::
new
()
...
@@ -31,7 +31,7 @@ pub async fn any_content_changed_of_module(
...
@@ -31,7 +31,7 @@ pub async fn any_content_changed_of_module(
.await
.await
.completed
()
?
.completed
()
?
.into_postorder_topological
()
.into_postorder_topological
()
.map
(|
m
|
content_changed
(
*
ResolvedVc
::
upcast
(
m
)
))
.map
(|
m
|
source_changed
(
*
m
))
.map
(|
v
|
v
.to_resolved
())
.map
(|
v
|
v
.to_resolved
())
.try_join
()
.try_join
()
.await
?
;
.await
?
;
...
@@ -65,3 +65,14 @@ pub async fn content_changed(asset: Vc<Box<dyn Asset>>) -> Result<Vc<Completion>
...
@@ -65,3 +65,14 @@ pub async fn content_changed(asset: Vc<Box<dyn Asset>>) -> Result<Vc<Completion>
asset
.content
()
.file_content
()
.await
?
;
asset
.content
()
.file_content
()
.await
?
;
Ok
(
Completion
::
new
())
Ok
(
Completion
::
new
())
}
}
/// Returns a completion that changes when the content of the given asset
/// changes.
#[turbo_tasks
::
function]
pub
async
fn
source_changed
(
asset
:
Vc
<
Box
<
dyn
Module
>>
)
->
Result
<
Vc
<
Completion
>>
{
if
let
Some
(
source
)
=
*
asset
.source
()
.await
?
{
// Reading the file content is enough to add as dependency
source
.content
()
.file_content
()
.await
?
;
}
Ok
(
Completion
::
new
())
}
turbopack/crates/turbopack-core/src/chunk/evaluate.rs
View file @
a57e4e80
...
@@ -3,7 +3,6 @@ use turbo_tasks::{ResolvedVc, Upcast, ValueToString, Vc};
...
@@ -3,7 +3,6 @@ use turbo_tasks::{ResolvedVc, Upcast, ValueToString, Vc};
use
super
::
ChunkableModule
;
use
super
::
ChunkableModule
;
use
crate
::{
use
crate
::{
asset
::
Asset
,
context
::
AssetContext
,
context
::
AssetContext
,
module
::
Module
,
module
::
Module
,
reference_type
::{
EntryReferenceSubType
,
ReferenceType
},
reference_type
::{
EntryReferenceSubType
,
ReferenceType
},
...
@@ -15,7 +14,7 @@ use crate::{
...
@@ -15,7 +14,7 @@ use crate::{
/// The chunking context implementation will resolve the dynamic entry to a
/// The chunking context implementation will resolve the dynamic entry to a
/// well-known value or trait object.
/// well-known value or trait object.
#[turbo_tasks
::
value_trait]
#[turbo_tasks
::
value_trait]
pub
trait
EvaluatableAsset
:
Asset
+
Module
+
ChunkableModule
{}
pub
trait
EvaluatableAsset
:
Module
+
ChunkableModule
{}
pub
trait
EvaluatableAssetExt
{
pub
trait
EvaluatableAssetExt
{
fn
to_evaluatable
(
fn
to_evaluatable
(
...
...
turbopack/crates/turbopack-core/src/chunk/mod.rs
View file @
a57e4e80
...
@@ -89,7 +89,7 @@ pub struct ModuleIds(Vec<ModuleId>);
...
@@ -89,7 +89,7 @@ pub struct ModuleIds(Vec<ModuleId>);
/// A [Module] that can be converted into a [Chunk].
/// A [Module] that can be converted into a [Chunk].
#[turbo_tasks
::
value_trait]
#[turbo_tasks
::
value_trait]
pub
trait
ChunkableModule
:
Module
+
Asset
{
pub
trait
ChunkableModule
:
Module
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
fn
as_chunk_item
(
fn
as_chunk_item
(
self
:
Vc
<
Self
>
,
self
:
Vc
<
Self
>
,
...
@@ -114,7 +114,7 @@ impl ChunkableModules {
...
@@ -114,7 +114,7 @@ impl ChunkableModules {
// with other module types (as a MergeableModule cannot prevent itself from being merged with other
// with other module types (as a MergeableModule cannot prevent itself from being merged with other
// module types)
// module types)
#[turbo_tasks
::
value_trait]
#[turbo_tasks
::
value_trait]
pub
trait
MergeableModule
:
Module
+
Asset
{
pub
trait
MergeableModule
:
Module
{
/// Even though MergeableModule is implemented, this allows a dynamic condition to determine
/// Even though MergeableModule is implemented, this allows a dynamic condition to determine
/// mergeability
/// mergeability
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-core/src/introspect/module.rs
View file @
a57e4e80
...
@@ -33,8 +33,12 @@ impl Introspectable for IntrospectableModule {
...
@@ -33,8 +33,12 @@ impl Introspectable for IntrospectableModule {
}
}
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
fn
details
(
&
self
)
->
Vc
<
RcStr
>
{
async
fn
details
(
&
self
)
->
Result
<
Vc
<
RcStr
>>
{
content_to_details
(
self
.
0
.content
())
if
let
Some
(
source
)
=
*
self
.
0
.source
()
.await
?
{
Ok
(
content_to_details
(
source
.content
()))
}
else
{
Ok
(
Vc
::
cell
(
"No source"
.into
()))
}
}
}
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-core/src/module.rs
View file @
a57e4e80
use
turbo_rcstr
::
RcStr
;
use
turbo_rcstr
::
RcStr
;
use
turbo_tasks
::{
ResolvedVc
,
TaskInput
,
ValueToString
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
TaskInput
,
ValueToString
,
Vc
};
use
crate
::{
asset
::
Asset
,
ident
::
AssetIdent
,
reference
::
ModuleReferences
,
source
::
OptionSource
};
use
crate
::{
ident
::
AssetIdent
,
reference
::
ModuleReferences
,
source
::
OptionSource
};
#[derive(Clone,
Copy,
Debug,
TaskInput,
Hash)]
#[derive(Clone,
Copy,
Debug,
TaskInput,
Hash)]
#[turbo_tasks
::
value(shared)]
#[turbo_tasks
::
value(shared)]
...
@@ -28,7 +28,7 @@ pub enum ModuleSideEffects {
...
@@ -28,7 +28,7 @@ pub enum ModuleSideEffects {
/// A module. This usually represents parsed source code, which has references
/// A module. This usually represents parsed source code, which has references
/// to other modules.
/// to other modules.
#[turbo_tasks
::
value_trait]
#[turbo_tasks
::
value_trait]
pub
trait
Module
:
Asset
{
pub
trait
Module
{
/// The identifier of the [Module]. It's expected to be unique and capture
/// The identifier of the [Module]. It's expected to be unique and capture
/// all properties of the [Module].
/// all properties of the [Module].
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
@@ -64,7 +64,7 @@ pub trait Module: Asset {
...
@@ -64,7 +64,7 @@ pub trait Module: Asset {
}
}
#[turbo_tasks
::
value_trait]
#[turbo_tasks
::
value_trait]
pub
trait
StyleModule
:
Module
+
Asset
{
pub
trait
StyleModule
:
Module
{
/// The style type of the module.
/// The style type of the module.
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
fn
style_type
(
&
self
)
->
Vc
<
StyleType
>
;
fn
style_type
(
&
self
)
->
Vc
<
StyleType
>
;
...
...
turbopack/crates/turbopack-core/src/node_addon_module.rs
View file @
a57e4e80
...
@@ -7,7 +7,6 @@ use turbo_tasks::{FxIndexSet, ResolvedVc, TryJoinIterExt, Vc};
...
@@ -7,7 +7,6 @@ use turbo_tasks::{FxIndexSet, ResolvedVc, TryJoinIterExt, Vc};
use
turbo_tasks_fs
::{
FileSystemEntryType
,
FileSystemPath
};
use
turbo_tasks_fs
::{
FileSystemEntryType
,
FileSystemPath
};
use
crate
::{
use
crate
::{
asset
::{
Asset
,
AssetContent
},
file_source
::
FileSource
,
file_source
::
FileSource
,
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -108,14 +107,6 @@ impl Module for NodeAddonModule {
...
@@ -108,14 +107,6 @@ impl Module for NodeAddonModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
NodeAddonModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
async
fn
dir_references
(
package_dir
:
FileSystemPath
)
->
Result
<
Vc
<
ModuleReferences
>>
{
async
fn
dir_references
(
package_dir
:
FileSystemPath
)
->
Result
<
Vc
<
ModuleReferences
>>
{
let
matches
=
read_matches
(
let
matches
=
read_matches
(
...
...
turbopack/crates/turbopack-core/src/raw_module.rs
View file @
a57e4e80
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
crate
::{
use
crate
::{
asset
::{
Asset
,
AssetContent
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
source
::{
OptionSource
,
Source
},
source
::{
OptionSource
,
Source
},
...
@@ -31,14 +30,6 @@ impl Module for RawModule {
...
@@ -31,14 +30,6 @@ impl Module for RawModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
RawModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
RawModule
{
impl
RawModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-core/src/rebase.rs
View file @
a57e4e80
use
std
::
hash
::
Hash
;
use
std
::
hash
::
Hash
;
use
anyhow
::
Result
;
use
anyhow
::
{
Result
,
bail
}
;
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
V
alueToString
,
V
c
};
use
turbo_tasks_fs
::
FileSystemPath
;
use
turbo_tasks_fs
::
FileSystemPath
;
use
crate
::{
use
crate
::{
...
@@ -74,7 +74,14 @@ impl OutputAsset for RebasedAsset {
...
@@ -74,7 +74,14 @@ impl OutputAsset for RebasedAsset {
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
Asset
for
RebasedAsset
{
impl
Asset
for
RebasedAsset
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
async
fn
content
(
&
self
)
->
Result
<
Vc
<
AssetContent
>>
{
self
.module
.content
()
if
let
Some
(
source
)
=
*
self
.module
.source
()
.await
?
{
Ok
(
source
.content
())
}
else
{
bail!
(
"Module {} has no source"
,
self
.module
.ident
()
.to_string
()
.await
?
)
}
}
}
}
}
turbopack/crates/turbopack-core/src/traced_asset.rs
View file @
a57e4e80
use
anyhow
::
Result
;
use
anyhow
::
{
Result
,
bail
}
;
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
V
alueToString
,
V
c
};
use
turbo_tasks_fs
::
FileSystemPath
;
use
turbo_tasks_fs
::
FileSystemPath
;
use
crate
::{
use
crate
::{
...
@@ -54,7 +54,14 @@ impl OutputAsset for TracedAsset {
...
@@ -54,7 +54,14 @@ impl OutputAsset for TracedAsset {
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
Asset
for
TracedAsset
{
impl
Asset
for
TracedAsset
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
async
fn
content
(
&
self
)
->
Result
<
Vc
<
AssetContent
>>
{
self
.module
.content
()
if
let
Some
(
source
)
=
*
self
.module
.source
()
.await
?
{
Ok
(
source
.content
())
}
else
{
bail!
(
"Module {} has no source"
,
self
.module
.ident
()
.to_string
()
.await
?
,
)
}
}
}
}
}
turbopack/crates/turbopack-css/src/asset.rs
View file @
a57e4e80
...
@@ -3,7 +3,6 @@ use turbo_rcstr::rcstr;
...
@@ -3,7 +3,6 @@ use turbo_rcstr::rcstr;
use
turbo_tasks
::{
IntoTraitRef
,
ResolvedVc
,
TryJoinIterExt
,
ValueToString
,
Vc
};
use
turbo_tasks
::{
IntoTraitRef
,
ResolvedVc
,
TryJoinIterExt
,
ValueToString
,
Vc
};
use
turbo_tasks_fs
::{
FileContent
,
FileSystemPath
};
use
turbo_tasks_fs
::{
FileContent
,
FileSystemPath
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
MinifyType
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
MinifyType
},
context
::
AssetContext
,
context
::
AssetContext
,
environment
::
Environment
,
environment
::
Environment
,
...
@@ -171,14 +170,6 @@ impl StyleModule for CssModuleAsset {
...
@@ -171,14 +170,6 @@ impl StyleModule for CssModuleAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
CssModuleAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
CssModuleAsset
{
impl
ChunkableModule
for
CssModuleAsset
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-css/src/chunk/mod.rs
View file @
a57e4e80
...
@@ -441,7 +441,7 @@ impl GenerateSourceMap for CssChunk {
...
@@ -441,7 +441,7 @@ impl GenerateSourceMap for CssChunk {
// TODO: remove
// TODO: remove
#[turbo_tasks
::
value_trait]
#[turbo_tasks
::
value_trait]
pub
trait
CssChunkPlaceable
:
ChunkableModule
+
Module
+
Asset
{}
pub
trait
CssChunkPlaceable
:
ChunkableModule
+
Module
{}
#[derive(Clone,
Debug)]
#[derive(Clone,
Debug)]
#[turbo_tasks
::
value(shared)]
#[turbo_tasks
::
value(shared)]
...
...
turbopack/crates/turbopack-css/src/embed.rs
View file @
a57e4e80
use
turbo_tasks
::
Vc
;
use
turbo_tasks
::
Vc
;
use
turbopack_core
::{
asset
::
Asset
,
chunk
::
ChunkingContext
,
module
::
Module
,
output
::
OutputAsset
};
use
turbopack_core
::{
chunk
::
ChunkingContext
,
module
::
Module
,
output
::
OutputAsset
};
#[turbo_tasks
::
value_trait]
#[turbo_tasks
::
value_trait]
pub
trait
CssEmbed
:
Module
+
Asset
{
pub
trait
CssEmbed
:
Module
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
fn
embedded_asset
(
fn
embedded_asset
(
self
:
Vc
<
Self
>
,
self
:
Vc
<
Self
>
,
...
...
turbopack/crates/turbopack-css/src/module_asset.rs
View file @
a57e4e80
...
@@ -8,7 +8,6 @@ use turbo_rcstr::{RcStr, rcstr};
...
@@ -8,7 +8,6 @@ use turbo_rcstr::{RcStr, rcstr};
use
turbo_tasks
::{
FxIndexMap
,
IntoTraitRef
,
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks
::{
FxIndexMap
,
IntoTraitRef
,
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks_fs
::{
FileSystemPath
,
rope
::
Rope
};
use
turbo_tasks_fs
::{
FileSystemPath
,
rope
::
Rope
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
ModuleChunkItemIdExt
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
ModuleChunkItemIdExt
},
context
::{
AssetContext
,
ProcessResult
},
context
::{
AssetContext
,
ProcessResult
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
...
@@ -120,14 +119,6 @@ impl Module for ModuleCssAsset {
...
@@ -120,14 +119,6 @@ impl Module for ModuleCssAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
ModuleCssAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
/// A CSS class that is exported from a CSS module.
/// A CSS class that is exported from a CSS module.
///
///
/// See [`ModuleCssClasses`] for more information.
/// See [`ModuleCssClasses`] for more information.
...
...
turbopack/crates/turbopack-ecmascript/src/async_chunk/module.rs
View file @
a57e4e80
...
@@ -2,7 +2,6 @@ use anyhow::Result;
...
@@ -2,7 +2,6 @@ use anyhow::Result;
use
turbo_rcstr
::
rcstr
;
use
turbo_rcstr
::
rcstr
;
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
ChunkableModule
,
ChunkingContext
,
availability_info
::
AvailabilityInfo
},
chunk
::{
ChunkableModule
,
ChunkingContext
,
availability_info
::
AvailabilityInfo
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -72,14 +71,6 @@ impl Module for AsyncLoaderModule {
...
@@ -72,14 +71,6 @@ impl Module for AsyncLoaderModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
AsyncLoaderModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
panic!
(
"content() should not be called"
);
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
AsyncLoaderModule
{
impl
ChunkableModule
for
AsyncLoaderModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/chunk/placeable.rs
View file @
a57e4e80
...
@@ -26,7 +26,7 @@ use crate::references::{
...
@@ -26,7 +26,7 @@ use crate::references::{
};
};
#[turbo_tasks
::
value_trait]
#[turbo_tasks
::
value_trait]
pub
trait
EcmascriptChunkPlaceable
:
ChunkableModule
+
Module
+
Asset
{
pub
trait
EcmascriptChunkPlaceable
:
ChunkableModule
+
Module
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
fn
get_exports
(
self
:
Vc
<
Self
>
)
->
Vc
<
EcmascriptExports
>
;
fn
get_exports
(
self
:
Vc
<
Self
>
)
->
Vc
<
EcmascriptExports
>
;
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/inlined_bytes_module.rs
View file @
a57e4e80
...
@@ -5,7 +5,7 @@ use turbo_rcstr::rcstr;
...
@@ -5,7 +5,7 @@ use turbo_rcstr::rcstr;
use
turbo_tasks
::{
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks_fs
::{
FileContent
,
rope
::
RopeBuilder
};
use
turbo_tasks_fs
::{
FileContent
,
rope
::
RopeBuilder
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::
{
Asset
,
AssetContent
}
,
asset
::
Asset
,
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -56,14 +56,6 @@ impl Module for InlinedBytesJsModule {
...
@@ -56,14 +56,6 @@ impl Module for InlinedBytesJsModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
InlinedBytesJsModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
InlinedBytesJsModule
{
impl
ChunkableModule
for
InlinedBytesJsModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
@@ -125,7 +117,7 @@ impl ChunkItem for InlinedBytesJsChunkItem {
...
@@ -125,7 +117,7 @@ impl ChunkItem for InlinedBytesJsChunkItem {
impl
EcmascriptChunkItem
for
InlinedBytesJsChunkItem
{
impl
EcmascriptChunkItem
for
InlinedBytesJsChunkItem
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
async
fn
content
(
&
self
)
->
Result
<
Vc
<
EcmascriptChunkItemContent
>>
{
async
fn
content
(
&
self
)
->
Result
<
Vc
<
EcmascriptChunkItemContent
>>
{
let
content
=
self
.module
.content
()
.file_content
()
.await
?
;
let
content
=
self
.module.
await
?
.source
.
content
()
.file_content
()
.await
?
;
match
&*
content
{
match
&*
content
{
FileContent
::
Content
(
data
)
=>
{
FileContent
::
Content
(
data
)
=>
{
let
mut
inner_code
=
RopeBuilder
::
default
();
let
mut
inner_code
=
RopeBuilder
::
default
();
...
...
turbopack/crates/turbopack-ecmascript/src/lib.rs
View file @
a57e4e80
...
@@ -80,7 +80,6 @@ use turbo_tasks::{
...
@@ -80,7 +80,6 @@ use turbo_tasks::{
};
};
use
turbo_tasks_fs
::{
FileJsonContent
,
FileSystemPath
,
glob
::
Glob
,
rope
::
Rope
};
use
turbo_tasks_fs
::{
FileJsonContent
,
FileSystemPath
,
glob
::
Glob
,
rope
::
Rope
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
chunk
::{
AsyncModuleInfo
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
EvaluatableAsset
,
AsyncModuleInfo
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
EvaluatableAsset
,
MergeableModule
,
MergeableModuleExposure
,
MergeableModules
,
MergeableModulesExposed
,
MergeableModule
,
MergeableModuleExposure
,
MergeableModules
,
MergeableModulesExposed
,
...
@@ -403,7 +402,7 @@ pub trait EcmascriptParsable {
...
@@ -403,7 +402,7 @@ pub trait EcmascriptParsable {
}
}
#[turbo_tasks
::
value_trait]
#[turbo_tasks
::
value_trait]
pub
trait
EcmascriptAnalyzable
:
Module
+
Asset
{
pub
trait
EcmascriptAnalyzable
:
Module
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
fn
analyze
(
self
:
Vc
<
Self
>
)
->
Vc
<
AnalyzeEcmascriptModuleResult
>
;
fn
analyze
(
self
:
Vc
<
Self
>
)
->
Vc
<
AnalyzeEcmascriptModuleResult
>
;
...
@@ -780,14 +779,6 @@ impl Module for EcmascriptModuleAsset {
...
@@ -780,14 +779,6 @@ impl Module for EcmascriptModuleAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
EcmascriptModuleAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
EcmascriptModuleAsset
{
impl
ChunkableModule
for
EcmascriptModuleAsset
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/manifest/chunk_asset.rs
View file @
a57e4e80
...
@@ -2,7 +2,6 @@ use anyhow::Result;
...
@@ -2,7 +2,6 @@ use anyhow::Result;
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
chunk
::{
ChunkableModule
,
ChunkingContext
,
ChunkingContextExt
,
availability_info
::
AvailabilityInfo
,
ChunkableModule
,
ChunkingContext
,
ChunkingContextExt
,
availability_info
::
AvailabilityInfo
,
},
},
...
@@ -158,14 +157,6 @@ impl Module for ManifestAsyncModule {
...
@@ -158,14 +157,6 @@ impl Module for ManifestAsyncModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
ManifestAsyncModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
panic!
(
"content() should not be called"
);
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
ManifestAsyncModule
{
impl
ChunkableModule
for
ManifestAsyncModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/merged_module.rs
View file @
a57e4e80
use
anyhow
::{
Context
,
Result
};
use
anyhow
::{
Context
,
Result
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
chunk
::{
AsyncModuleInfo
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
AsyncModuleInfo
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
MergeableModuleExposure
,
MergeableModules
,
MergeableModulesExposed
,
MergeableModuleExposure
,
MergeableModules
,
MergeableModulesExposed
,
...
@@ -60,14 +59,6 @@ impl MergedEcmascriptModule {
...
@@ -60,14 +59,6 @@ impl MergedEcmascriptModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
MergedEcmascriptModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
panic!
(
"content() should not be called"
);
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
Module
for
MergedEcmascriptModule
{
impl
Module
for
MergedEcmascriptModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/references/external_module.rs
View file @
a57e4e80
...
@@ -4,9 +4,7 @@ use anyhow::{Context, Result};
...
@@ -4,9 +4,7 @@ use anyhow::{Context, Result};
use
bincode
::{
Decode
,
Encode
};
use
bincode
::{
Decode
,
Encode
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
NonLocalValue
,
ResolvedVc
,
TaskInput
,
TryJoinIterExt
,
Vc
,
trace
::
TraceRawVcs
};
use
turbo_tasks
::{
NonLocalValue
,
ResolvedVc
,
TaskInput
,
TryJoinIterExt
,
Vc
,
trace
::
TraceRawVcs
};
use
turbo_tasks_fs
::{
use
turbo_tasks_fs
::{
FileSystem
,
FileSystemPath
,
LinkType
,
VirtualFileSystem
,
rope
::
RopeBuilder
};
FileContent
,
FileSystem
,
FileSystemPath
,
LinkType
,
VirtualFileSystem
,
rope
::
RopeBuilder
,
};
use
turbo_tasks_hash
::{
encode_hex
,
hash_xxh3_hash64
};
use
turbo_tasks_hash
::{
encode_hex
,
hash_xxh3_hash64
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
asset
::{
Asset
,
AssetContent
},
...
@@ -332,7 +330,8 @@ impl Module for CachedExternalModule {
...
@@ -332,7 +330,8 @@ impl Module for CachedExternalModule {
// graph for chunking. `compute_async_module_info` computes
// graph for chunking. `compute_async_module_info` computes
// `is_self_async` for every module, but at least for traced modules,
// `is_self_async` for every module, but at least for traced modules,
// that value is never used as `ChunkingType::Traced.is_inherit_async()
// that value is never used as `ChunkingType::Traced.is_inherit_async()
// == false`. Optimize this case by using `ModuleWithoutSelfAsync` to
// == false`. Optimize this case by using
// `SideEffectfulModuleWithoutSelfAsync` to
// short circuit that computation and thus defer parsing traced modules
// short circuit that computation and thus defer parsing traced modules
// to emitting to not block all of chunking on this.
// to emitting to not block all of chunking on this.
.map
(|
m
|
Vc
::
upcast
(
SideEffectfulModuleWithoutSelfAsync
::
new
(
*
m
))),
.map
(|
m
|
Vc
::
upcast
(
SideEffectfulModuleWithoutSelfAsync
::
new
(
*
m
))),
...
@@ -362,15 +361,6 @@ impl Module for CachedExternalModule {
...
@@ -362,15 +361,6 @@ impl Module for CachedExternalModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
CachedExternalModule
{
#[turbo_tasks
::
function]
fn
content
(
self
:
Vc
<
Self
>
)
->
Vc
<
AssetContent
>
{
// should be `NotFound` as this function gets called to detect source changes
AssetContent
::
file
(
FileContent
::
NotFound
.cell
())
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
CachedExternalModule
{
impl
ChunkableModule
for
CachedExternalModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
@@ -518,14 +508,6 @@ impl SideEffectfulModuleWithoutSelfAsync {
...
@@ -518,14 +508,6 @@ impl SideEffectfulModuleWithoutSelfAsync {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
SideEffectfulModuleWithoutSelfAsync
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.module
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
Module
for
SideEffectfulModuleWithoutSelfAsync
{
impl
Module
for
SideEffectfulModuleWithoutSelfAsync
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
@@ -535,7 +517,7 @@ impl Module for SideEffectfulModuleWithoutSelfAsync {
...
@@ -535,7 +517,7 @@ impl Module for SideEffectfulModuleWithoutSelfAsync {
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
fn
source
(
&
self
)
->
Vc
<
turbopack_core
::
source
::
OptionSource
>
{
fn
source
(
&
self
)
->
Vc
<
turbopack_core
::
source
::
OptionSource
>
{
Vc
::
cell
(
None
)
self
.module
.source
(
)
}
}
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/references/require_context.rs
View file @
a57e4e80
...
@@ -21,7 +21,6 @@ use turbo_tasks::{
...
@@ -21,7 +21,6 @@ use turbo_tasks::{
};
};
use
turbo_tasks_fs
::{
DirectoryContent
,
DirectoryEntry
,
FileSystemPath
};
use
turbo_tasks_fs
::{
DirectoryContent
,
DirectoryEntry
,
FileSystemPath
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkableModuleReference
,
ChunkingContext
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkableModuleReference
,
ChunkingContext
,
MinifyType
,
ModuleChunkItemIdExt
,
MinifyType
,
ModuleChunkItemIdExt
,
...
@@ -439,14 +438,6 @@ impl Module for RequireContextAsset {
...
@@ -439,14 +438,6 @@ impl Module for RequireContextAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
RequireContextAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
unimplemented!
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
RequireContextAsset
{
impl
ChunkableModule
for
RequireContextAsset
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/side_effect_optimization/facade/module.rs
View file @
a57e4e80
...
@@ -2,9 +2,7 @@ use std::collections::BTreeMap;
...
@@ -2,9 +2,7 @@ use std::collections::BTreeMap;
use
anyhow
::{
Result
,
bail
};
use
anyhow
::{
Result
,
bail
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks_fs
::{
File
,
FileContent
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
chunk
::{
AsyncModuleInfo
,
ChunkableModule
,
ChunkingContext
,
EvaluatableAsset
,
MergeableModule
,
AsyncModuleInfo
,
ChunkableModule
,
ChunkingContext
,
EvaluatableAsset
,
MergeableModule
,
MergeableModules
,
MergeableModulesExposed
,
MergeableModules
,
MergeableModulesExposed
,
...
@@ -193,16 +191,6 @@ impl Module for EcmascriptModuleFacadeModule {
...
@@ -193,16 +191,6 @@ impl Module for EcmascriptModuleFacadeModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
EcmascriptModuleFacadeModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
let
f
=
File
::
from
(
""
);
AssetContent
::
file
(
FileContent
::
Content
(
f
)
.cell
())
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
EcmascriptAnalyzable
for
EcmascriptModuleFacadeModule
{
impl
EcmascriptAnalyzable
for
EcmascriptModuleFacadeModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/side_effect_optimization/locals/module.rs
View file @
a57e4e80
...
@@ -3,7 +3,6 @@ use std::collections::BTreeMap;
...
@@ -3,7 +3,6 @@ use std::collections::BTreeMap;
use
anyhow
::{
Result
,
bail
};
use
anyhow
::{
Result
,
bail
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
chunk
::{
AsyncModuleInfo
,
ChunkableModule
,
ChunkingContext
,
MergeableModule
,
MergeableModules
,
AsyncModuleInfo
,
ChunkableModule
,
ChunkingContext
,
MergeableModule
,
MergeableModules
,
MergeableModulesExposed
,
MergeableModulesExposed
,
...
@@ -77,14 +76,6 @@ impl Module for EcmascriptModuleLocalsModule {
...
@@ -77,14 +76,6 @@ impl Module for EcmascriptModuleLocalsModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
EcmascriptModuleLocalsModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.module
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
EcmascriptAnalyzable
for
EcmascriptModuleLocalsModule
{
impl
EcmascriptAnalyzable
for
EcmascriptModuleLocalsModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/tree_shake/asset.rs
View file @
a57e4e80
...
@@ -2,7 +2,6 @@ use anyhow::Result;
...
@@ -2,7 +2,6 @@ use anyhow::Result;
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
AsyncModuleInfo
,
ChunkableModule
,
ChunkingContext
,
EvaluatableAsset
},
chunk
::{
AsyncModuleInfo
,
ChunkableModule
,
ChunkingContext
,
EvaluatableAsset
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -345,14 +344,6 @@ impl Module for EcmascriptModulePartAsset {
...
@@ -345,14 +344,6 @@ impl Module for EcmascriptModulePartAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
EcmascriptModulePartAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.full_module
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
EcmascriptChunkPlaceable
for
EcmascriptModulePartAsset
{
impl
EcmascriptChunkPlaceable
for
EcmascriptModulePartAsset
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/tree_shake/side_effect_module.rs
View file @
a57e4e80
use
anyhow
::
Result
;
use
anyhow
::
Result
;
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
Vc
};
use
turbo_tasks_fs
::
FileContent
;
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
ChunkableModule
,
ChunkingContext
,
EvaluatableAsset
},
chunk
::{
ChunkableModule
,
ChunkingContext
,
EvaluatableAsset
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -122,21 +120,6 @@ impl Module for SideEffectsModule {
...
@@ -122,21 +120,6 @@ impl Module for SideEffectsModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
SideEffectsModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
AssetContent
::
File
(
FileContent
::
Content
(
"// This is a proxy module for reexportings a module with additional side effects."
.into
(),
)
.resolved_cell
(),
)
.cell
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
EcmascriptChunkPlaceable
for
SideEffectsModule
{
impl
EcmascriptChunkPlaceable
for
SideEffectsModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-ecmascript/src/typescript/mod.rs
View file @
a57e4e80
...
@@ -4,7 +4,7 @@ use turbo_rcstr::{RcStr, rcstr};
...
@@ -4,7 +4,7 @@ use turbo_rcstr::{RcStr, rcstr};
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
ValueToString
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
TryJoinIterExt
,
ValueToString
,
Vc
};
use
turbo_tasks_fs
::
DirectoryContent
;
use
turbo_tasks_fs
::
DirectoryContent
;
use
turbopack_core
::{
use
turbopack_core
::{
asset
::
{
Asset
,
AssetContent
}
,
asset
::
Asset
,
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
raw_module
::
RawModule
,
raw_module
::
RawModule
,
...
@@ -180,14 +180,6 @@ impl Module for TsConfigModuleAsset {
...
@@ -180,14 +180,6 @@ impl Module for TsConfigModuleAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
TsConfigModuleAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value]
#[turbo_tasks
::
value]
#[derive(Hash,
Debug)]
#[derive(Hash,
Debug)]
pub
struct
CompilerReference
{
pub
struct
CompilerReference
{
...
...
turbopack/crates/turbopack-ecmascript/src/webpack/mod.rs
View file @
a57e4e80
...
@@ -3,7 +3,6 @@ use swc_core::ecma::ast::Lit;
...
@@ -3,7 +3,6 @@ use swc_core::ecma::ast::Lit;
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
ValueToString
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
file_source
::
FileSource
,
file_source
::
FileSource
,
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -69,14 +68,6 @@ impl Module for WebpackModuleAsset {
...
@@ -69,14 +68,6 @@ impl Module for WebpackModuleAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
WebpackModuleAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value(shared)]
#[turbo_tasks
::
value(shared)]
pub
struct
WebpackChunkAssetReference
{
pub
struct
WebpackChunkAssetReference
{
#[turbo_tasks(trace_ignore)]
#[turbo_tasks(trace_ignore)]
...
...
turbopack/crates/turbopack-ecmascript/src/worker_chunk/module.rs
View file @
a57e4e80
...
@@ -2,7 +2,6 @@ use anyhow::Result;
...
@@ -2,7 +2,6 @@ use anyhow::Result;
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
ValueToString
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
chunk
::{
ChunkGroupType
,
ChunkableModule
,
ChunkableModuleReference
,
ChunkingContext
,
ChunkingType
,
ChunkGroupType
,
ChunkableModule
,
ChunkableModuleReference
,
ChunkingContext
,
ChunkingType
,
ChunkingTypeOption
,
ChunkingTypeOption
,
...
@@ -75,14 +74,6 @@ impl Module for WorkerLoaderModule {
...
@@ -75,14 +74,6 @@ impl Module for WorkerLoaderModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
WorkerLoaderModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
panic!
(
"content() should not be called"
);
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
WorkerLoaderModule
{
impl
ChunkableModule
for
WorkerLoaderModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-json/src/lib.rs
View file @
a57e4e80
...
@@ -16,7 +16,7 @@ use turbo_rcstr::rcstr;
...
@@ -16,7 +16,7 @@ use turbo_rcstr::rcstr;
use
turbo_tasks
::{
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
ValueToString
,
Vc
};
use
turbo_tasks_fs
::{
FileContent
,
FileJsonContent
};
use
turbo_tasks_fs
::{
FileContent
,
FileJsonContent
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::
{
Asset
,
AssetContent
}
,
asset
::
Asset
,
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
code_builder
::
CodeBuilder
,
code_builder
::
CodeBuilder
,
ident
::
AssetIdent
,
ident
::
AssetIdent
,
...
@@ -64,14 +64,6 @@ impl Module for JsonModuleAsset {
...
@@ -64,14 +64,6 @@ impl Module for JsonModuleAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
JsonModuleAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
JsonModuleAsset
{
impl
ChunkableModule
for
JsonModuleAsset
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
@@ -135,7 +127,7 @@ impl EcmascriptChunkItem for JsonChunkItem {
...
@@ -135,7 +127,7 @@ impl EcmascriptChunkItem for JsonChunkItem {
async
fn
content
(
&
self
)
->
Result
<
Vc
<
EcmascriptChunkItemContent
>>
{
async
fn
content
(
&
self
)
->
Result
<
Vc
<
EcmascriptChunkItemContent
>>
{
// We parse to JSON and then stringify again to ensure that the
// We parse to JSON and then stringify again to ensure that the
// JSON is valid.
// JSON is valid.
let
content
=
self
.module
.content
()
.file_content
();
let
content
=
self
.module.
await
?
.source
.
content
()
.file_content
();
let
data
=
content
.parse_json
()
.await
?
;
let
data
=
content
.parse_json
()
.await
?
;
match
&*
data
{
match
&*
data
{
FileJsonContent
::
Content
(
data
)
=>
{
FileJsonContent
::
Content
(
data
)
=>
{
...
...
turbopack/crates/turbopack-node/src/transforms/postcss.rs
View file @
a57e4e80
...
@@ -12,7 +12,7 @@ use turbo_tasks_fs::{
...
@@ -12,7 +12,7 @@ use turbo_tasks_fs::{
};
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
asset
::{
Asset
,
AssetContent
},
changed
::
any_content_changed_of_module
,
changed
::
any_
source_
content_changed_of_module
,
context
::{
AssetContext
,
ProcessResult
},
context
::{
AssetContext
,
ProcessResult
},
file_source
::
FileSource
,
file_source
::
FileSource
,
ident
::
AssetIdent
,
ident
::
AssetIdent
,
...
@@ -195,7 +195,7 @@ async fn config_changed(
...
@@ -195,7 +195,7 @@ async fn config_changed(
.module
();
.module
();
Ok
(
Vc
::
<
Completions
>
::
cell
(
vec!
[
Ok
(
Vc
::
<
Completions
>
::
cell
(
vec!
[
any_content_changed_of_module
(
config_asset
)
any_
source_
content_changed_of_module
(
config_asset
)
.to_resolved
()
.to_resolved
()
.await
?
,
.await
?
,
extra_configs_changed
(
asset_context
,
postcss_config_path
)
extra_configs_changed
(
asset_context
,
postcss_config_path
)
...
@@ -231,9 +231,11 @@ async fn extra_configs_changed(
...
@@ -231,9 +231,11 @@ async fn extra_configs_changed(
.try_into_module
()
.try_into_module
()
.await
?
.await
?
{
{
Some
(
module
)
=>
{
Some
(
module
)
=>
Some
(
Some
(
any_content_changed_of_module
(
*
module
)
.to_resolved
()
.await
?
)
any_source_content_changed_of_module
(
*
module
)
}
.to_resolved
()
.await
?
,
),
None
=>
None
,
None
=>
None
,
}
}
}
else
{
}
else
{
...
...
turbopack/crates/turbopack-static/src/css.rs
View file @
a57e4e80
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::
ChunkingContext
,
chunk
::
ChunkingContext
,
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -57,14 +56,6 @@ impl Module for StaticUrlCssModule {
...
@@ -57,14 +56,6 @@ impl Module for StaticUrlCssModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
StaticUrlCssModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
CssEmbed
for
StaticUrlCssModule
{
impl
CssEmbed
for
StaticUrlCssModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-static/src/ecma.rs
View file @
a57e4e80
...
@@ -2,7 +2,6 @@ use anyhow::Result;
...
@@ -2,7 +2,6 @@ use anyhow::Result;
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
ResolvedVc
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
AssetSuffix
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
chunk
::{
AssetSuffix
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
ident
::
AssetIdent
,
ident
::
AssetIdent
,
module
::{
Module
,
ModuleSideEffects
},
module
::{
Module
,
ModuleSideEffects
},
...
@@ -69,14 +68,6 @@ impl Module for StaticUrlJsModule {
...
@@ -69,14 +68,6 @@ impl Module for StaticUrlJsModule {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
StaticUrlJsModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
StaticUrlJsModule
{
impl
ChunkableModule
for
StaticUrlJsModule
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-wasm/src/module_asset.rs
View file @
a57e4e80
...
@@ -3,7 +3,6 @@ use turbo_rcstr::rcstr;
...
@@ -3,7 +3,6 @@ use turbo_rcstr::rcstr;
use
turbo_tasks
::{
IntoTraitRef
,
ResolvedVc
,
Vc
,
fxindexmap
};
use
turbo_tasks
::{
IntoTraitRef
,
ResolvedVc
,
Vc
,
fxindexmap
};
use
turbo_tasks_fs
::
FileSystemPath
;
use
turbo_tasks_fs
::
FileSystemPath
;
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
chunk
::{
AsyncModuleInfo
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
AsyncModuleInfo
,
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
,
chunk_group
::
references_to_output_assets
,
chunk_group
::
references_to_output_assets
,
...
@@ -153,14 +152,6 @@ impl Module for WebAssemblyModuleAsset {
...
@@ -153,14 +152,6 @@ impl Module for WebAssemblyModuleAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
WebAssemblyModuleAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
WebAssemblyModuleAsset
{
impl
ChunkableModule
for
WebAssemblyModuleAsset
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
turbopack/crates/turbopack-wasm/src/raw.rs
View file @
a57e4e80
...
@@ -2,7 +2,6 @@ use anyhow::{Result, bail};
...
@@ -2,7 +2,6 @@ use anyhow::{Result, bail};
use
turbo_rcstr
::
rcstr
;
use
turbo_rcstr
::
rcstr
;
use
turbo_tasks
::{
IntoTraitRef
,
ResolvedVc
,
Vc
};
use
turbo_tasks
::{
IntoTraitRef
,
ResolvedVc
,
Vc
};
use
turbopack_core
::{
use
turbopack_core
::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
chunk
::{
ChunkItem
,
ChunkType
,
ChunkableModule
,
ChunkingContext
},
context
::
AssetContext
,
context
::
AssetContext
,
ident
::
AssetIdent
,
ident
::
AssetIdent
,
...
@@ -72,14 +71,6 @@ impl Module for RawWebAssemblyModuleAsset {
...
@@ -72,14 +71,6 @@ impl Module for RawWebAssemblyModuleAsset {
}
}
}
}
#[turbo_tasks
::
value_impl]
impl
Asset
for
RawWebAssemblyModuleAsset
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
self
.source
.content
()
}
}
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ChunkableModule
for
RawWebAssemblyModuleAsset
{
impl
ChunkableModule
for
RawWebAssemblyModuleAsset
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
...
...
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