Update dependency to use analyzer 13#359
Merged
Merged
Conversation
Collaborator
Author
|
Hello @sigurdm, the update to analyzer 12.0.0 turned out to be non-breaking (as seen from this package, at least), so I took another step and updated it directly to analyzer 13.0.0. |
sigurdm
reviewed
May 22, 2026
sigurdm
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the dependencies in the reflectable packages to use analyzer ^13.0.0 and migrates the code generator accordingly. In particular:
Analyzer ^13.0.0 removes the class
DefaultFormalParameter. Default values are now handled via a property onFormalParameter. Old approach: Check if a parameter node is aDefaultFormalParameter, access itsdefaultValue. New approach: Check thedefaultClauseproperty on aFormalParameterorRegularFormalParameterand access itsvalue.Similarly, the class
NamedExpressionhas been removed and replaced byNamedArgument, in order to model named arguments in anArgumentList. Old approach: Useexpression is NamedExpressionand accessexpression.nameandexpression.expression. New approach: Useexpression is NamedArgumentand accessexpression.name.lexemeto get the label name andexpression.argumentExpressionto get the value.Finally, the
argumentsproperty ofArgumentListnow returns aNodeList<Argument>instead of aNodeList<Expression>. Various loops have been updated to use the new types.This PR also prepares
reflectablefor a release as v5.2.3 andreflectable_builderas v1.2.3. Version v5.2.3 ofreflectabledoesn't actually change anything other than the version, but I'd like to allow all usages ofreflectableandreflectable_builderto remain in sync with respect to the version number such that developers can always update those two IDs together (e.g., from 5.2.2 to 5.2.3 along with 1.2.2 to 1.2.3, simultaneously).Finally, this PR fixes a bug in 'example.dart' (where a lint asked for a type annotation on a parameter, but the type annotation which was added was wrong).