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
dc1f2cc4
Commit
dc1f2cc4
authored
Sep 23, 2025
by
Luke Sandberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consistently emit an issue instead of just a bail
parent
d5170ebd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
context.rs
turbopack/crates/turbopack-core/src/context.rs
+3
-2
module.rs
turbopack/crates/turbopack-core/src/issue/module.rs
+3
-3
No files found.
turbopack/crates/turbopack-core/src/context.rs
View file @
dc1f2cc4
...
@@ -29,13 +29,14 @@ pub enum ProcessResult {
...
@@ -29,13 +29,14 @@ pub enum ProcessResult {
#[turbo_tasks
::
value_impl]
#[turbo_tasks
::
value_impl]
impl
ProcessResult
{
impl
ProcessResult
{
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
pub
fn
module
(
&
self
)
->
Result
<
Vc
<
Box
<
dyn
Module
>>>
{
pub
async
fn
module
(
&
self
)
->
Result
<
Vc
<
Box
<
dyn
Module
>>>
{
match
*
self
{
match
*
self
{
ProcessResult
::
Module
(
m
)
=>
Ok
(
*
m
),
ProcessResult
::
Module
(
m
)
=>
Ok
(
*
m
),
ProcessResult
::
Ignore
=>
{
ProcessResult
::
Ignore
=>
{
bail!
(
"Expected process result to be a module, but it was ignored"
)
bail!
(
"Expected process result to be a module, but it was ignored"
)
}
}
ProcessResult
::
Unknown
(
_
)
=>
{
ProcessResult
::
Unknown
(
source
)
=>
{
emit_unknown_module_type_error
(
*
source
)
.await
?
;
bail!
(
"Expected process result to be a module, but it could not be processed"
)
bail!
(
"Expected process result to be a module, but it could not be processed"
)
}
}
}
}
...
...
turbopack/crates/turbopack-core/src/issue/module.rs
View file @
dc1f2cc4
...
@@ -70,11 +70,11 @@ pub async fn emit_unknown_module_type_error(source: Vc<Box<dyn Source>>) -> Resu
...
@@ -70,11 +70,11 @@ pub async fn emit_unknown_module_type_error(source: Vc<Box<dyn Source>>) -> Resu
ModuleIssue
{
ModuleIssue
{
ident
:
source
.ident
()
.to_resolved
()
.await
?
,
ident
:
source
.ident
()
.to_resolved
()
.await
?
,
title
:
StyledString
::
Text
(
rcstr!
(
"Unknown module type"
))
.resolved_cell
(),
title
:
StyledString
::
Text
(
rcstr!
(
"Unknown module type"
))
.resolved_cell
(),
description
:
StyledString
::
Text
(
description
:
StyledString
::
Text
(
rcstr!
(
r
"This module doesn't have an associated type. Use a known file extension, or register a loader for it.
r
"This module doesn't have an associated type. Use a known file extension, or register a loader for it.
Read more: https://nextjs.org/docs/app/api-reference/next-config-js/turbo#webpack-loaders"
.into
(),
Read more: https://nextjs.org/docs/app/api-reference/next-config-js/turbo#webpack-loaders"
)
)
)
.resolved_cell
(),
.resolved_cell
(),
source
:
Some
(
IssueSource
::
from_source_only
(
source
.to_resolved
()
.await
?
)),
source
:
Some
(
IssueSource
::
from_source_only
(
source
.to_resolved
()
.await
?
)),
}
}
...
...
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