Skip to content

Upgrading analyzer 13 to 14

Breaking13.3.0 → 14.7.0Breaking11Deprecated1New7Changed14Fixed4Other1

BreakingUpgrade verdict

11 breaking changes.

  • 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`.
Top 4 of 12 that need code or config changes

Dart SDK requirement changed in 14.6.0: ^3.11.0 → ^3.13.0.

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_reference
Removes the undefined_annotation diagnostic; undefined names now report undefined_identifier or invalid_annotation as appropriate.
undefined_annotationinvalid_annotation
Removes the non_constant_annotation_constructor diagnostic; non-const constructors now report const_with_non_const.
non_constant_annotation_constructorconst_with_non_constno_annotation_constructor_arguments
Removes FormalParameterElement.isInitializingFormal; use type checks instead.
FormalParameterElement.isInitializingFormalFieldFormalParameterElement
Removes FormalParameterElement.isSuperFormal; use type checks instead.
FormalParameterElement.isSuperFormalSuperFormalParameterElement
Removes PackageConfigFileBuilder from analyzer utilities; use analyzer_testing instead.
PackageConfigFileBuilder
Removes FormalParameterElement.formalParameters; use FormalParameterElement.type instead.
FormalParameterElement.formalParametersFormalParameterElement.type
Removes FormalParameterElement.typeParameters; use FormalParameterElement.type instead.
FormalParameterElement.typeParametersFormalParameterElement.type
Replaces 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_write
Removes experimental FunctionBody.lookupThisType; use CompilationUnit.lookupThisType instead, which also works outside function bodies.
FunctionBody.lookupThisTypeCompilationUnit.lookupThisType
Deprecated1
Deprecates CommentReference.newKeyword, which now always returns null.
CommentReference.newKeyword