Skip to content

Commit

Permalink
fix: compatible for dart 3.4.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
YoloMao committed Jun 5, 2024
1 parent dd34f04 commit 8198086
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
13 changes: 13 additions & 0 deletions dart_flutter.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
diff --git a/pkg/_macros/lib/src/executor/augmentation_library.dart b/pkg/_macros/lib/src/executor/augmentation_library.dart
index 71489b9aa98..f776aa3c438 100644
--- a/pkg/_macros/lib/src/executor/augmentation_library.dart
+++ b/pkg/_macros/lib/src/executor/augmentation_library.dart
@@ -290,7 +290,7 @@ class _Builder {
(OmittedTypeAnnotation omittedType, _SynthesizedNamePart part) {
String name = '$prefix${index++}';
part.text = name;
- _omittedTypes[omittedType] = name;
+ _omittedTypes![omittedType] = name;
});
}

diff --git a/pkg/vm/lib/modular/target/flutter.dart b/pkg/vm/lib/modular/target/flutter.dart
index 3a797cac..4010ce9d 100644
--- a/pkg/vm/lib/modular/target/flutter.dart
Expand Down
5 changes: 3 additions & 2 deletions lib/flutter_frontend_server/flutter_frontend_compiler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'package:frontend_server/frontend_server.dart' as frontend
import 'package:kernel/ast.dart';
import 'package:path/path.dart' as path;
import 'package:vm/incremental_compiler.dart';
import 'package:vm/target/flutter.dart';
import 'package:vm/modular/target/flutter.dart';

import '../src/aop/aop_transformer_wrapper.dart';

Expand Down Expand Up @@ -121,13 +121,14 @@ class FlutterFrontendCompiler implements frontend.CompilerInterface {
@override
Future<void> compileExpressionToJs(
String libraryUri,
String? scriptUri,
int line,
int column,
Map<String, String> jsModules,
Map<String, String> jsFrameValues,
String moduleName,
String expression) {
return _compiler.compileExpressionToJs(libraryUri, line, column, jsModules,
return _compiler.compileExpressionToJs(libraryUri, scriptUri, line, column, jsModules,
jsFrameValues, moduleName, expression);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/aop/aop_transformer_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/// limitations under the License.
import 'package:kernel/ast.dart';
import 'package:vm/target/flutter.dart';
import 'package:vm/modular/target/flutter.dart';

import 'package:growingio_aspectd_frontend/src/aop/growingio_inject_transformer.dart';
import 'package:growingio_aspectd_frontend/src/aop/growingio_super_inject_transformer.dart';
Expand Down
28 changes: 7 additions & 21 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,11 @@ version: 1.0.0
# homepage: https://www.example.com

environment:
sdk: '>=2.18.5 <3.0.0'
sdk: '>=3.3.0 <4.0.0'

dependencies:
analyzer: ^6.4.1
args: ^2.3.1
bazel_worker: ^1.1.1
coverage: ^1.7.2
fixnum: ^1.0.1
http_parser: ^4.0.2
matcher: ^0.12.13
mime: ^1.0.3
node_preamble: ^2.0.1
protobuf: ^3.1.0
quiver: ^3.1.0
shelf: ^1.4.0
shelf_packages_handler: ^3.0.1
shelf_static: ^1.1.1
shelf_web_socket: ^1.0.3
vm_service: ^14.1.0
yaml: ^3.1.1

dev_dependencies:
lints: ^3.0.0
test: ^1.22.1

dependency_overrides:
kernel:
Expand Down Expand Up @@ -64,4 +45,9 @@ dependency_overrides:
wasm_builder:
path: ./sdk/pkg/wasm_builder
mmap:
path: ./sdk/pkg/mmap
path: ./sdk/pkg/mmap
_macros:
path: ./sdk/pkg/_macros
macros:
path: ./sdk/pkg/macros

0 comments on commit 8198086

Please sign in to comment.