-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #1036 Bump source_gen version #1038
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Generated via set_version.dart. !!!DO NOT MODIFY BY HAND!!! | ||
|
||
/// The current version as per `pubspec.yaml`. | ||
const version = '2.2.2'; | ||
const version = '2.3.0'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Generated via set_version.dart. !!!DO NOT MODIFY BY HAND!!! | ||
|
||
/// The current version as per `pubspec.yaml`. | ||
const version = '2.4.0'; | ||
const version = '2.5.0'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Generated via set_version.dart. !!!DO NOT MODIFY BY HAND!!! | ||
|
||
/// The current version as per `pubspec.yaml`. | ||
const version = '2.6.2'; | ||
const version = '2.7.1'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: mobx_codegen | ||
description: Code generator for MobX that adds support for annotating your code with @observable, @computed, @action and also creating Store classes. | ||
version: 2.7.0 | ||
version: 2.7.1 | ||
|
||
repository: https://github.com/mobxjs/mobx.dart | ||
issue_tracker: https://github.com/mobxjs/mobx.dart/issues | ||
|
@@ -14,13 +14,13 @@ environment: | |
sdk: ">=3.0.0 <4.0.0" | ||
|
||
dependencies: | ||
analyzer: ">=6.0.0 <7.0.0" | ||
analyzer: ">=6.0.0 <= 7.3.0" | ||
build: ^2.2.1 | ||
build_resolvers: ^2.0.6 | ||
meta: ^1.3.0 | ||
mobx: ^2.5.0 | ||
path: ^1.8.0 | ||
source_gen: ^1.2.1 | ||
source_gen: ^2.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be changed to a range constraint, otherwise the project will require Dart 3.6 as a minimum, and the usage of source_gen is compatible with v1
|
||
|
||
dev_dependencies: | ||
build_runner: ^2.4.9 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,16 +12,16 @@ class MockMethod extends Mock implements MethodElement {} | |
|
||
class MockType extends Mock implements DartType {} | ||
|
||
class DynamicMockType extends Mock implements DynamicType {} | ||
|
||
MockMethod mockFutureMethod({ | ||
bool returnsDynamic = false, | ||
bool returnsFuture = false, | ||
bool returnsFutureOr = false, | ||
bool isAsync = false, | ||
bool isGenerator = false, | ||
}) { | ||
final returnType = MockType(); | ||
// ignore: deprecated_member_use | ||
when(() => returnType.isDynamic).thenReturn(returnsDynamic); | ||
final returnType = returnsDynamic ? DynamicMockType() : MockType(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line is failing the static analysis when using the latest dependencies. final DartType returnType;
if (returnsDynamic) {
returnType = DynamicMockType();
} else {
returnType = MockType();
} |
||
when(() => returnType.isDartAsyncFuture).thenReturn(returnsFuture); | ||
when(() => returnType.isDartAsyncFutureOr).thenReturn(returnsFutureOr); | ||
|
||
|
@@ -37,9 +37,7 @@ MockMethod mockStreamMethod({ | |
bool isGenerator = false, | ||
bool returnsDynamic = false, | ||
}) { | ||
final returnType = MockType(); | ||
// ignore: deprecated_member_use | ||
when(() => returnType.isDynamic).thenReturn(returnsDynamic); | ||
final returnType = returnsDynamic ? DynamicMockType() : MockType(); | ||
|
||
final method = MockMethod(); | ||
when(() => method.returnType).thenReturn(returnType); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Generated via set_version.dart. !!!DO NOT MODIFY BY HAND!!! | ||
|
||
/// The current version as per `pubspec.yaml`. | ||
const version = '1.0.0'; | ||
const version = '1.1.0'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that the changes in
type_names.dart
will require analyzer 6.9.0 as a minimum. And I believe that it requires Dart 3.6