-
Notifications
You must be signed in to change notification settings - Fork 124
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
Bump to analyzer 5.1.0 and handle deprecations #1140
Conversation
I think test and analyzer 5.0.0 have some pub version solve issue, so that effectively, analyzer 5.0.0 paired with package:test are only supported on Dart 2.18.0. Should I change the GitHub actions to handle this? (As it is, I guess we're now testing 2.17.0 and 2.19.0-dev.) |
I've merged in a bump to the GitHub actions, combining #1142 with this. Good talk. |
This is a preliminary step to #1141 PTAL @munificent @natebosch |
@@ -2022,7 +2022,7 @@ class SourceVisitor extends ThrowingAstVisitor { | |||
_simpleStatement(node, () { | |||
token(node.libraryKeyword); | |||
space(); | |||
visit(node.name); | |||
visit(node.name2); |
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.
what's happening with this one?
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.
In analyzer 5.1.0, .name
is deprecated in favor of .name2
.
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.
Is this on a different type than the rest of the invocations?
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.
Oops, my bad. In all of the other changes, .name2
is deprecated in favor of .name
.
For this change, LibraryDirective.name
, a non-nullable String is being replaced with LibraryDirective.name2
, a nullable String (for the case of an omitted named).
@@ -9,7 +9,7 @@ environment: | |||
sdk: ">=2.17.0 <3.0.0" | |||
|
|||
dependencies: | |||
analyzer: '>=4.4.0 <6.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.
I can't leave a comment on the right line - but we need to bump the version of dart_style
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.
Done
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 looked up the relevant APIs... It feels weird that on some nodes we're flipping one way, and on other nodes the opposite way... 🤷
Yeah that is definitely a weird situation in this release. Accidental on my and Konstantin's part. |
Since one of the deprecations is moving
.name2
back to.name
, I think it's necessary to bump the lower bound. In analyzer 4.4.0,.name
may have meant a different thing...In any case, analyzer 5.1.0 is the first release to allow unnamed libraries, so I think it is necessary for the follow up PR which adds such support in dart_style.