Skip to content

Commit 69d164a

Browse files
authored
fix(cli): Only cross-compile with non-Flutter SDKs (#444)
There seems to be an issue with the Dart SDK shipped with the latest Flutter betas where cross-compiling results in a VM snapshot error.
1 parent 45fd08e commit 69d164a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

apps/cli/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- feat: Allow overriding client environment with Dart define
44
- fix: Searching parent directories for a `pubspec.yaml` file always halts now
5+
- fix: Only cross-compile with non-Flutter Dart SDKs
56
- chore: Update dependencies
67

78
## 1.0.13

apps/cli/lib/src/sdk/dart_sdk.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ class Sdk {
251251

252252
/// Whether or not the current SDK supports cross-compilation.
253253
bool get supportsCrossCompilation {
254-
return version >= _crossCompilationVersion;
254+
return version >= _crossCompilationVersion &&
255+
// TODO(dnys1): The version of `dart` bundled with the Flutter SDK leads
256+
// to VM snapshot errors when cross-compiling, so we don't support it.
257+
sdkType == SdkType.dart;
255258
}
256259
}
257260

0 commit comments

Comments
 (0)