Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
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
abdullh.alsoleman
Front-End
Commits
15082387
Unverified
Commit
15082387
authored
Jul 27, 2022
by
Zachary Anderson
Committed by
GitHub
Jul 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] Include impellerc output in ShaderCompilerException (#108348)
parent
41940c93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
shader_compiler.dart
...r_tools/lib/src/build_system/targets/shader_compiler.dart
+7
-3
shader_compiler_test.dart
...eral.shard/build_system/targets/shader_compiler_test.dart
+11
-5
No files found.
packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart
View file @
15082387
...
@@ -181,12 +181,16 @@ class ShaderCompiler {
...
@@ -181,12 +181,16 @@ class ShaderCompiler {
final
Process
impellercProcess
=
await
_processManager
.
start
(
cmd
);
final
Process
impellercProcess
=
await
_processManager
.
start
(
cmd
);
final
int
code
=
await
impellercProcess
.
exitCode
;
final
int
code
=
await
impellercProcess
.
exitCode
;
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
_logger
.
printTrace
(
await
utf8
.
decodeStream
(
impellercProcess
.
stdout
));
final
String
stdout
=
await
utf8
.
decodeStream
(
impellercProcess
.
stdout
);
_logger
.
printError
(
await
utf8
.
decodeStream
(
impellercProcess
.
stderr
));
final
String
stderr
=
await
utf8
.
decodeStream
(
impellercProcess
.
stderr
);
_logger
.
printTrace
(
stdout
);
_logger
.
printError
(
stderr
);
if
(
fatal
)
{
if
(
fatal
)
{
throw
ShaderCompilerException
.
_
(
throw
ShaderCompilerException
.
_
(
'Shader compilation of "
${input.path}
" to "
$outputPath
" '
'Shader compilation of "
${input.path}
" to "
$outputPath
" '
'failed with exit code
$code
.'
,
'failed with exit code
$code
.
\n
'
'impellerc stdout:
\n
$stdout
\n
'
'impellerc stderr:
\n
$stderr
'
,
);
);
}
}
return
false
;
return
false
;
...
...
packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart
View file @
15082387
...
@@ -199,6 +199,8 @@ void main() {
...
@@ -199,6 +199,8 @@ void main() {
'--input-type=frag'
,
'--input-type=frag'
,
'--include=
$fragDir
'
,
'--include=
$fragDir
'
,
],
],
stdout:
'impellerc stdout'
,
stderr:
'impellerc stderr'
,
exitCode:
1
,
exitCode:
1
,
),
),
]);
]);
...
@@ -209,14 +211,18 @@ void main() {
...
@@ -209,14 +211,18 @@ void main() {
artifacts:
artifacts
,
artifacts:
artifacts
,
);
);
await
expectLater
(
try
{
()
=>
shaderCompiler
.
compileShader
(
await
shaderCompiler
.
compileShader
(
input:
fileSystem
.
file
(
notFragPath
),
input:
fileSystem
.
file
(
notFragPath
),
outputPath:
outputPath
,
outputPath:
outputPath
,
target:
ShaderTarget
.
sksl
,
target:
ShaderTarget
.
sksl
,
),
);
throwsA
(
isA
<
ShaderCompilerException
>()),
fail
(
'unreachable'
);
);
}
on
ShaderCompilerException
catch
(
e
)
{
expect
(
e
.
toString
(),
contains
(
'impellerc stdout:
\n
impellerc stdout'
));
expect
(
e
.
toString
(),
contains
(
'impellerc stderr:
\n
impellerc stderr'
));
}
expect
(
fileSystem
.
file
(
outputPath
).
existsSync
(),
false
);
expect
(
fileSystem
.
file
(
outputPath
).
existsSync
(),
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