Skip to content

Commit f777c9f

Browse files
author
Jonah Williams
authored
[flutter_tools] use absolute path for shader lib (#116123)
* [flutter_tools] use absolute path for shader lib * update tests
1 parent 4c3b642 commit f777c9f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ class ShaderCompiler {
175175
);
176176
}
177177

178-
final String shaderLibPath = _fs.path.join(_fs.path.dirname(impellerc.path), 'shader_lib');
179-
178+
final String shaderLibPath = _fs.path.join(impellerc.parent.absolute.path, 'shader_lib');
180179
final List<String> cmd = <String>[
181180
impellerc.path,
182181
target.target,
@@ -190,6 +189,7 @@ class ShaderCompiler {
190189
'--include=${input.parent.path}',
191190
'--include=$shaderLibPath',
192191
];
192+
_logger.printTrace('shaderc command: $cmd');
193193
final Process impellercProcess = await _processManager.start(cmd);
194194
final int code = await impellercProcess.exitCode;
195195
if (code != 0) {

packages/flutter_tools/test/general.shard/asset_bundle_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import 'package:flutter_tools/src/globals.dart' as globals;
1717
import '../src/common.dart';
1818
import '../src/context.dart';
1919

20-
const String shaderLibDir = './shader_lib';
20+
const String shaderLibDir = '/./shader_lib';
2121

2222
void main() {
2323
group('AssetBundle.build', () {

packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ void main() {
263263
'--input=/shader.glsl',
264264
'--input-type=frag',
265265
'--include=/',
266-
'--include=./shader_lib',
266+
'--include=/./shader_lib',
267267
]),
268268
FakeCommand(command: <String>[
269269
'codesign',

packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import '../../../src/common.dart';
1616
import '../../../src/fake_process_manager.dart';
1717

1818
const String fragDir = '/shaders';
19-
const String shaderLibDir = './shader_lib';
19+
const String shaderLibDir = '/./shader_lib';
2020
const String fragPath = '/shaders/my_shader.frag';
2121
const String notFragPath = '/shaders/not_a_frag.file';
2222
const String outputSpirvPath = '/output/shaders/my_shader.frag.spirv';

0 commit comments

Comments
 (0)