Skip to content

Commit

Permalink
Fix wasm-opt location when using local_web_sdk (#127355)
Browse files Browse the repository at this point in the history
We were looking up the wrong path for `wasm-opt` previously when using the `local-web-sdk` flag.
  • Loading branch information
eyebrowsoffire committed May 22, 2023
1 parent 7a12d82 commit 758ea6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/src/artifacts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ class CachedLocalWebSdkArtifacts implements Artifacts {
);
case Artifact.wasmOptBinary:
return _fileSystem.path.join(
_getDartSdkPath(), 'bin', 'snapshots',
_getDartSdkPath(), 'bin', 'utils',
_artifactToFileName(artifact, _platform, mode),
);
case Artifact.genSnapshot:
Expand Down
7 changes: 7 additions & 0 deletions packages/flutter_tools/test/general.shard/artifacts_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,13 @@ void main() {
fileSystem.path.join('/flutter', 'prebuilts', 'linux-x64', 'dart-sdk',
'bin', 'snapshots', 'dart2js.dart.snapshot'),
);
expect(
artifacts.getArtifactPath(
Artifact.wasmOptBinary,
platform: TargetPlatform.web_javascript),
fileSystem.path.join('/flutter', 'prebuilts', 'linux-x64', 'dart-sdk',
'bin', 'utils', 'wasm-opt'),
);
});

testWithoutContext('getEngineType', () {
Expand Down

0 comments on commit 758ea6c

Please sign in to comment.