-
-
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?
Conversation
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.
LGTM
I add fix for deprecated fields, pls can you look again ? @OlehMarch |
FEAT: melos run command result FIX: update analyzer version FIX: removed in Dart 3.7 deprecated fields
ed41c61
to
54d6be4
Compare
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.
LGTM
There are some build failures. Once we fix those, we should be good to merge @SunBro-Marko ... thanks for the contribution 🚀! |
Is there any particular reason for not supporting analyzer <8.0.0 ? I believe the Dart team is quite strict regarding breaking changes in the analyzer package. |
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 comment
The reason will be displayed to describe this comment to others. Learn more.
This line is failing the static analysis when using the latest dependencies.
This static analysis bug was fixed in Dart 3.4.0 but mobx supports Dart 3.0.0 as a minimum. To keep supporting this version it can be simply changed to an if else block. Source: dart-lang/sdk#60255
final DartType returnType;
if (returnsDynamic) {
returnType = DynamicMockType();
} else {
returnType = MockType();
}
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 comment
The 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
source_gen: ">=1.2.1 <3.0.0"
@@ -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" |
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
Just updated source_gen package version to support last SDK, and avoid conflicts with over libs
Fixes #1036
Pull Request Checklist
pubspec.yaml
is updated.major
/minor
/patch
/patch-count
, depending on the complexity of changemelos run set_version
command from the root directory