From e7ae3a223793c536fea9837d97c59d6a8037f751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Fri, 16 Jun 2023 11:38:54 +0200 Subject: [PATCH] Attempting to fix flutter drive hang --- ejson/README.md | 25 +++++++++++++------ .../ejson_analyzer/lib/ejson_analyzer.dart | 5 ---- .../packages/ejson_core/test/ejson_test.dart | 2 +- flutter/realm_flutter/pubspec.yaml | 5 ++-- flutter/realm_flutter/tests/pubspec.yaml | 4 ++- pubspec.yaml | 3 ++- test/test.dart | 11 ++++---- 7 files changed, 33 insertions(+), 22 deletions(-) diff --git a/ejson/README.md b/ejson/README.md index 2366c6c86..db237c7e5 100644 --- a/ejson/README.md +++ b/ejson/README.md @@ -11,16 +11,29 @@ and the Flutter guide for [developing packages and plugins](https://flutter.dev/developing-packages). --> -Support for serializing and deserializing Extended JSON ([EJson](https://www.mongodb.com/docs/manual/reference/mongodb-extended-json/)) +Support for serializing and deserializing Extended JSON ([EJson](https://www.mongodb.com/docs/manual/reference/mongodb-extended-json/)) + +| package | | | +| ---------------- | ----------- | --- | +| ejson | | [![pub package](https://img.shields.io/pub/v/ejson.svg)](https://pub.dartlang.org/packages/ejson) | +| ejson_annotation | | [![pub package](https://img.shields.io/pub/v/ejson_annotation.svg)](https://pub.dartlang.org/packages/ejson_annotation) | +| ejson_core | | [![pub package](https://img.shields.io/pub/v/ejson_core.svg)](https://pub.dartlang.org/packages/ejson_core) | +| ejson_generator | | [![pub package](https://img.shields.io/pub/v/ejson_generator.svg)](https://pub.dartlang.org/packages/ejson_generator) | +| ejson_lint | | [![pub package](https://img.shields.io/pub/v/ejson_lint.svg)](https://pub.dartlang.org/packages/ejson_lint) | +| ejson_analyze | | [![pub package](https://img.shields.io/pub/v/ejson.svg)](https://pub.dartlang.org/packages/ejson) | -## Features +## Features +* Support EJson de-/serialization of: ## Getting started -TODO: List prerequisites and provide or point to information on how to -start using the package. +This package require Dart 3. + +For an app the simplest way to support EJson is to take a dependency on ejson. This will include all needed packages by transitive closure. + +However, all packages will be included as direct dependencies, wheres as ## Usage @@ -33,6 +46,4 @@ const like = 'sample'; ## Additional information -TODO: Tell users more about the package: where to find more information, how to -contribute to the package, how to file issues, what response they can expect -from the package authors, and more. +You can read more about EJson at https://www.mongodb.com/docs/manual/reference/mongodb-extended-json/ diff --git a/ejson/packages/ejson_analyzer/lib/ejson_analyzer.dart b/ejson/packages/ejson_analyzer/lib/ejson_analyzer.dart index deae32011..0960f8c16 100644 --- a/ejson/packages/ejson_analyzer/lib/ejson_analyzer.dart +++ b/ejson/packages/ejson_analyzer/lib/ejson_analyzer.dart @@ -1,8 +1,3 @@ -/// Support for doing something awesome. -/// -/// More dartdocs go here. library; export 'src/ejson_analyzer_base.dart'; - -// TODO: Export any libraries intended for clients of this package. diff --git a/ejson/packages/ejson_core/test/ejson_test.dart b/ejson/packages/ejson_core/test/ejson_test.dart index 648fe1f85..f1e198a26 100644 --- a/ejson/packages/ejson_core/test/ejson_test.dart +++ b/ejson/packages/ejson_core/test/ejson_test.dart @@ -18,8 +18,8 @@ import 'dart:convert'; -import 'package:ejson_core/ejson_core.dart'; import 'package:ejson_annotation/ejson_annotation.dart'; +import 'package:ejson_core/ejson_core.dart'; import 'package:test/test.dart'; import 'ejson_serialization_setup.g.dart'; diff --git a/flutter/realm_flutter/pubspec.yaml b/flutter/realm_flutter/pubspec.yaml index 50aea9aa6..bd0fc97d7 100644 --- a/flutter/realm_flutter/pubspec.yaml +++ b/flutter/realm_flutter/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: collection: ^1.16.0 crypto: ^3.0.0 ejson_annotation: ^0.1.0 - ejson: ^0.1.0 + ejson_core: ^0.1.0 ffi: ^2.0.1 json_annotation: ^4.7.0 logging: ^1.2.0 @@ -41,7 +41,8 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - ejson_generator: ^0.1.0 + ejson: ^0.1.0 + ejson_generator: ^0.1.0 lints: ^2.0.0 flutter: diff --git a/flutter/realm_flutter/tests/pubspec.yaml b/flutter/realm_flutter/tests/pubspec.yaml index c3530d13f..8a1dc05c2 100644 --- a/flutter/realm_flutter/tests/pubspec.yaml +++ b/flutter/realm_flutter/tests/pubspec.yaml @@ -12,7 +12,8 @@ environment: dependencies: flutter: sdk: flutter - ejson: ^0.1.0 + ejson_annotation: ^0.1.0 + ejson_core: ^0.1.0 realm: # When depending on this package from a real application you should use: # realm_flutter: ^x.y.z @@ -24,6 +25,7 @@ dependencies: dev_dependencies: flutter_driver: sdk: flutter + ejson: ^0.1.0 flutter_lints: ^2.0.1 build_runner: ^2.1.2 test: ^1.20.1 diff --git a/pubspec.yaml b/pubspec.yaml index b24338ece..ffb6c2953 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: collection: ^1.16.0 crypto: ^3.0.0 ejson_annotation: ^0.1.0 - ejson: ^0.1.0 + ejson_core: ^0.1.0 ffi: ^2.0.1 json_annotation: ^4.7.0 logging: ^1.2.0 @@ -37,6 +37,7 @@ dependencies: dev_dependencies: build_cli: ^2.2.0 + ejson: ^0.1.0 ejson_generator: ^0.1.0 json_serializable: ^6.3.1 lints: ^2.0.0 diff --git a/test/test.dart b/test/test.dart index e1a0f2525..49133eb81 100644 --- a/test/test.dart +++ b/test/test.dart @@ -16,26 +16,27 @@ // //////////////////////////////////////////////////////////////////////////////// -import 'package:ejson/ejson.dart'; - import 'dart:async'; import 'dart:collection'; import 'dart:ffi'; import 'dart:io'; import 'dart:math'; + +import 'package:args/args.dart'; +import 'package:ejson/ejson.dart'; import 'package:logging/logging.dart'; import 'package:meta/meta.dart'; import 'package:path/path.dart' as _path; import 'package:test/test.dart' hide test; import 'package:test/test.dart' as testing; -import 'package:args/args.dart'; + import '../lib/realm.dart'; import '../lib/src/cli/atlas_apps/baas_client.dart'; -import '../lib/src/native/realm_core.dart'; import '../lib/src/configuration.dart'; +import '../lib/src/native/realm_core.dart'; -part 'test.realm.dart'; part 'test.g.dart'; +part 'test.realm.dart'; @RealmModel() class _Car {