Upgrading analyzer 13 to 14
Breaking13.3.0 → 14.7.0Breaking11Deprecated1New7Changed14Fixed4Other1
BreakingUpgrade verdict
11 breaking changes.
In plain terms
- Documentation comments that write `[new C]` no longer link to the class; write `[C.new]` instead.
- Removes the `deprecated_new_in_comment_reference` diagnostic and its quick fix.
- Removes the `undefined_annotation` diagnostic; undefined names now report `undefined_identifier` or `invalid_annotation` as appropriate.
- Removes the `non_constant_annotation_constructor` diagnostic; non-const constructors now report `const_with_non_const`.
Must act Top 4 of 12 that need code or config changes
Dart SDK requirement changed in 14.6.0: ^3.11.0 → ^3.13.0.
What you must change
Breaking11
Removes support for the
new keyword in comment references, so [new C] is no longer resolved, indexed, or renamed.Removes the
deprecated_new_in_comment_reference diagnostic and its quick fix.deprecated_new_in_comment_referenceRemoves the
undefined_annotation diagnostic; undefined names now report undefined_identifier or invalid_annotation as appropriate.undefined_annotationinvalid_annotationRemoves the
non_constant_annotation_constructor diagnostic; non-const constructors now report const_with_non_const.non_constant_annotation_constructorconst_with_non_constno_annotation_constructor_argumentsRemoves FormalParameterElement.isInitializingFormal; use type checks instead.
FormalParameterElement.isInitializingFormalFieldFormalParameterElementRemoves FormalParameterElement.isSuperFormal; use type checks instead.
FormalParameterElement.isSuperFormalSuperFormalParameterElementRemoves PackageConfigFileBuilder from analyzer utilities; use analyzer_testing instead.
PackageConfigFileBuilderRemoves FormalParameterElement.formalParameters; use FormalParameterElement.type instead.
FormalParameterElement.formalParametersFormalParameterElement.typeRemoves FormalParameterElement.typeParameters; use FormalParameterElement.type instead.
FormalParameterElement.typeParametersFormalParameterElement.typeReplaces many undefined-name and assignment diagnostics with read/write-specific diagnostics such as
undefined_unqualified_name_read and undefined_static_member_write.undefined_unqualified_name_readundefined_unqualified_name_writeundefined_prefixed_name_readundefined_prefixed_name_writeundefined_static_member_readundefined_static_member_writeundefined_instance_member_readundefined_instance_member_writeRemoves experimental FunctionBody.lookupThisType; use CompilationUnit.lookupThisType instead, which also works outside function bodies.
FunctionBody.lookupThisTypeCompilationUnit.lookupThisTypeDeprecations to plan for
Deprecated1
Deprecates
CommentReference.newKeyword, which now always returns null.CommentReference.newKeyword