Repository navigation
fix(deps): update dependency analyzer to v14 - #20
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
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 contains the following updates:
^4.1.0→^14.0.0Release Notes
dart-lang/sdk (analyzer)
v14.5.0languageVersionOverrideparameter toAnalysisContextCollectionto override the default language version for non-SDK files.
newkeyword in comment references. Text such as[new C]in a documentation comment is nolonger a comment reference, so it isn't resolved, indexed, or renamed. Use
[C.new]instead.CommentReference.newKeyword. It now always returnsnull.deprecated_new_in_comment_referencediagnostic, along with its quick fix.before the iterable, in source order. As a result,
dead_codefor a loopover an expression of type
Neverstarts at the loop body instead of theloop variable.
in a constant context, and an annotation with arguments,
@C(args), is theconstructor invocation
const C(args). Annotations report the samediagnostics as the equivalent constant expressions, usually at the name or
the argument instead of the whole annotation:
undefined_identifierorundefined_prefixed_namefor undefined names.creation_with_non_typefor@f(), wherefisn't a class.const_with_undefined_constructorfor undefined constructors.const_with_non_constfor constructors that aren't const.const_deferred_classfor constructors of classes from a deferred library.invalid_annotation_from_deferred_libraryis still reported forannotations without arguments.
wrong_number_of_type_argumentsfor the type as written, such as a typealias, instead of the class that it denotes.
const_constructor_param_type_mismatchin addition toargument_type_not_assignable, as forconst C(...).invalid_reference_to_generative_enum_constructorfor@E(), whereEisan enum, and
instantiate_abstract_classfor@C(), whereCisabstract. These weren't reported before.
undefined_annotationdiagnostic. It was reported only when thefirst name of an annotation was undefined, while an undefined name after a
class, as in
@Foo.bar, was reported asinvalid_annotation. Annotationsthat aren't identifiers, such as
@1or@'string', report only the syntaxerror.
non_constant_annotation_constructordiagnostic.@C(), wherethe constructor isn't const, reports
const_with_non_const.@Cand@C.namedreportno_annotation_constructor_argumentswhether or not theconstructor is const.
invalid_annotationis reported only for an annotation without argumentsthat references neither a constant variable nor a constructor, such as a
getter or a function. It's no longer reported for undefined names, undefined
constructors, invocations of things that aren't classes, or in addition to
ambiguous_importorannotation_with_type_arguments_uninstantiated.missing_required_argumentfor an annotation highlights the constructorreference, such as
A.namedorp.A, andinference_failure_on_instance_creationhighlights the class name, insteadof the whole annotation.
const_with_non_constant_argumentis no longer reported in addition toconst_with_non_constfor an invocation of a constructor that isn't const inthe arguments of an annotation.
const_with_non_constant_argument, like a positional argument, instead ofinvalid_constant.ElementAnnotation.constantEvaluationErrorsreports the same error as thediagnostic for the annotation. For example, for
@A(x), wherexisn't aconstant, it is now
const_with_non_constant_argumentinstead ofinvalid_constant./// @docImport 'dart:io' as io;.Documentation comments can reference
[io.File], and the prefix itself as[io].The prefix is a
PrefixElementwhoseimportsare the doc imports with this prefix;it isn't included into
LibraryFragment.prefixes.Removed the
doc_import_cannot_have_prefixdiagnostic.multiple doc-imported libraries is ambiguous instead of resolving to the first one,
and
show/hidecombinators are applied.Removed the
doc_import_cannot_have_combinatorsdiagnostic.PrefixElement.scopeLibraries, the libraries that provide the namesin
PrefixElement.scope. Unlikeimports, it includes the librariesimported with the same prefix in the enclosing files. When a prefix is used
alone, such as
[math]in a documentation comment, it references thelibrary, if there is exactly one.
ambiguous_comment_referencewarning. It is reported for a name ina comment reference that is imported, or doc-imported, from more than one
library, and for a prefix used alone, such as
[p], when more than onelibrary is imported with this prefix.
v14.4.0CompilationUnit.lookupThisType, which queries the type ofthisat an arbitrary offset within the compilation unit.FunctionBody.lookupThisType. UseCompilationUnit.lookupThisTypeinstead; unlike the removed method, it alsoworks at offsets that aren't inside a function body (for example inside the
initializer of a
lateinstance field).v14.3.014.2.0was retracted because of adding acccidental files.v14.1.0v14.0.0FormalParameterElement.isInitializingFormal. Use type checks (element is FieldFormalParameterElement) instead.FormalParameterElement.isSuperFormal. Use type checks (element is SuperFormalParameterElement) instead.PackageConfigFileBuilderfrompackage:analyzer/utilities/package_config_file_builder.dart. Usepackage:analyzer_testing/package_config_file_builder.dartinstead.FormalParameterElement.formalParameters. UseFormalParameterElement.typeinstead.FormalParameterElement.typeParameters. UseFormalParameterElement.typeinstead.v13.3.0Folder.getFile, deprecateFolder.getChildAssumingFile.Folder.getFolder, deprecateFolder.getChildAssumingFolder.v13.2.03.x.x.FormalParameterElement.formalParametersandtypeParameters. UseFormalParameterElement.typeinstead.isCompletetoConstructorDeclaration,FunctionDeclaration, andMethodDeclaration.MethodDeclaration.isAbstract. Use!isCompleteinstead.excludedPathsparameter inAnalysisContextCollection. Useanalysis_options.yamlto configure excluded paths instead.v13.1.0PackageConfigFileBuilderinpackage:analyzer/utilities/package_config_file_builder.dart. Usepackage:analyzer_testing/package_config_file_builder.dartinstead.isInitializingFormalinFormalParameterElement. Use type checks (element is FieldFormalParameterElement) instead.isSuperFormalinFormalParameterElement. Use type checks (element is SuperFormalParameterElement) instead.ExtensionTypeDeclaration.primaryConstructor. UseExtensionTypeDeclaration.namePartinstead.v13.0.0MixinFragment.superclassConstraintshas been removed. Usefragment.element.superclassConstraintsinstead.DefaultFormalParameterhas been removed. Default values for parameters are now represented compositionally via adefaultClauseproperty on allFormalParameternodes.SimpleFormalParameterandFunctionTypedFormalParameterhave been removed and replaced byRegularFormalParameter.functionTypedSuffixproperty onFormalParameter.NormalFormalParameterhas been removed from the AST hierarchy.AstVisitormethodsvisitDefaultFormalParameter,visitSimpleFormalParameter, andvisitFunctionTypedFormalParameterhave been removed. UsevisitRegularFormalParameterinstead for standard parameters.FormalParameterDefaultClauseandFunctionTypedFormalParameterSuffixAST nodes to represent parameter defaults and function-typed parameter structures.NamedExpressionhas been removed and replaced withNamedArgumentinArgumentListandRecordLiteralNamedFieldinRecordLiteral.ArgumentandRecordLiteralFieldAST node interfaces, whichExpressionnow implements.ArgumentList.argumentsnow returnsNodeList<Argument>instead ofNodeList<Expression>.RecordLiteral.fieldsnow returnsNodeList<RecordLiteralField>instead ofNodeList<Expression>.AstVisitor.visitNamedExpressionhas been removed. UsevisitNamedArgumentandvisitRecordLiteralNamedFieldinstead.FormalParameterElement.firstFragmentand.fragmentsnow returnFormalParameterFragment(instead of specific parameter fragment subtypes likeFieldFormalParameterFragment), making formal parameter fragments heterogeneous to support augmentations.LabelReferenceAST node to represent references to labels without them being in the expression hierarchy.Labelnow uses aToken nameinstead ofSimpleIdentifier label.BreakStatement.labelandContinueStatement.labelnow returnLabelReference?instead ofSimpleIdentifier?.v12.1.0dynamic,Never, andvoid. As a result, it is no longer safe to assume thatthere is a single instance of
DynamicType,NeverType, orVoidType. Use type checks (is DynamicType)instead of
identical().v12.0.0InstantiatedTypeAliasElement.nullabilitySuffix.;) in enums, extensions, and mixins, representingthem in the AST with
EmptyEnumBodyandEmptyClassBody.ClassBodyis now asealed classwith subclassesBlockClassBodyandEmptyClassBody. Getters like.members,.leftBracket,and
.rightBracketare available onBlockClassBody. This affectsClassDeclaration,ExtensionDeclaration, andMixinDeclarationbodies.EnumBodyis now asealed classwith subclassesBlockEnumBodyandEmptyEnumBody. Getters like.members,.leftBracket,and
.rightBracketare available onBlockEnumBody.LibraryIdentifier.LibraryDirective.nameandPartOfDirective.libraryNamenow returnDottedName?.DottedName.components(NodeList) isreplaced with
DottedName.tokens(List).v11.0.0ClassDeclaration.leftBracket.ClassDeclaration.members.ClassDeclaration.name.ClassDeclaration.rightBracket.ClassDeclaration.typeParameters.EnumDeclaration.constants.EnumDeclaration.leftBracket.EnumDeclaration.members.EnumDeclaration.name.EnumDeclaration.rightBracket.EnumDeclaration.semicolon.EnumDeclaration.typeParameters.ExtensionDeclaration.leftBracket.ExtensionDeclaration.members.ExtensionDeclaration.rightBracket.ExtensionTypeDeclaration.constKeyword.ExtensionTypeDeclaration.leftBracket.ExtensionTypeDeclaration.members.ExtensionTypeDeclaration.name.ExtensionTypeDeclaration.representation.ExtensionTypeDeclaration.rightBracket.ExtensionTypeDeclaration.typeParameters.ConstructorDeclaration.returnType.MixinDeclaration.leftBracket.MixinDeclaration.members.MixinDeclaration.rightBracket.NamedCompilationUnitMember.RepresentationConstructorName.RepresentationDeclaration.ConstructorElement.isSynthetic.ConstructorFragment.isSynthetic.Element.isSynthetic.ExecutableFragment.isSynthetic.PropertyAccessorElement.isSynthetic.PropertyInducingElement.isSynthetic.PropertyInducingFragment.isSynthetic.visitNamedCompilationUnitMember.visitRepresentationConstructorName.visitRepresentationDeclaration.RuleVisitorRegistry.addRepresentationConstructorName.RuleVisitorRegistry.addRepresentationDeclaration.ClassDeclaration,EnumDeclaration,FunctionDeclaration,MixinDeclaration, andTypeAliasnow implementCompilationUnitMemberdirectly (instead of
NamedCompilationUnitMember).v10.2.0RuleVisitorRegistry.addRepresentationConstructorName.RuleVisitorRegistry.addRepresentationDeclaration.v10.1.0TypeSystem.futureValueType.ConstructorElement.isDeclaring.ConstructorElement.isPrimary.FieldElement.declaringFormalParameter.FieldFormalParameterElement.isDeclaringandprivateName.FieldFormalParameterFragment.privateName.LibraryFragment.isSynthetic, useisOriginNotExistingFileinstead.alias,
dynamic, orNever) in a value expression slot are now represented asTypeLiteralnodes instead ofSimpleIdentifierorPrefixedIdentifiernodes (Issues 62763, 63113).v10.0.2v10.0.1v10.0.0ClassDeclaration:leftBracket,members,rightBracketare deprecated; usebodyinstead.name,typeParametersare deprecated; usenamePartinstead.EnumDeclaration:leftBracket,constants,members,rightBracketaredeprecated; use
bodyinstead.name,typeParametersare deprecated; usenamePartinstead.ExtensionDeclaration:leftBracket,members,rightBracketare deprecated; usebodyinstead.ExtensionTypeDeclaration:leftBracket,constants,members,rightBracketaredeprecated; use
bodyinstead.constKeyword,name,representation,typeParametersaredeprecated; use
primaryConstructorinstead.in the AST, their parent nodes have changed. This means that code relying on
specific parent-child relationships for these nodes might break.
DiagnosticOrErrorListenerand theDiagnosticOrErrorListenerExtensionextension.RecordingDiagnosticListener.onErrorand
BooleanDiagnosticListener.onErrormethods.LintCode.new'shasPublishedDocsparameter.RemovedAnalysisRuleas the preferred way to represent removed lintrules. Deprecated
RuleState.removed(which was the previous way to do so).ConstructorElement.isSynthetic.Use
isOriginDeclaration,isOriginImplicitDefault,isOriginMixinApplicationinstead.TopLevelVariableElement.isSynthetic.Use
isOriginDeclaration,isOriginGetterSetter.FieldElement.isSynthetic.Use
isOriginDeclaration,isOriginGetterSetter,isOriginDeclaringFormalParameter,isOriginEnumValuesinstead.PropertyAccessorElement.isSynthetic.Use
isOriginDeclaration,isOriginInterface,isOriginVariableinstead.Element.isSynthetic; useisOriginXyzproperties instead.LibraryElement.isSynthetic; useisOriginNotExistingFileinstead.SyntacticEntityis not intended to be subclassed byclients.
DiagnosticCode.nameandDiagnosticCode.uniqueName. UseDiagnosticCode.lowerCaseNameandDiagnosticCode.lowerCaseUniqueNameinstead.
GitPluginSource,PathPluginSource,PluginConfiguration,PluginSource,VersionedPluginSourcefrom thepublic API.
AnalysisOptions.pluginConfigurations.v9.0.0Diagnostic.data.DiagnosticReporter.atOffsetand the constructorsDiagnostic.tmpandDiagnostic.forValues, remove the deprecated namedparameter
errorCode, and make the named parameterdiagnosticCodenon-nullable and required.
DiagnosticReporter.atOffsetnamed parameter,errorCode.BooleanErrorListener.RecordingErrorListener.AnalysisErrorListener.NULL_LISTENER.AstNodeExtension.NullShortableExpression.PartDirective.configurations.TypeDefiningElement.TypeAliasElement.aliasedElement.resolveFile2.ErrorCode.ErrorSeverity.ErrorType.AnalysisErrorListener.RecordingDiagnosticListener.errors.RecordingDiagnosticListener.getErrorForSource.BooleanDiagnosticListener.onErrorin favor of.onDiagnostic.RecordingDiagnosticListener.onErrorin favor of.onDiagnostic.DiagnosticOrErrorListenerin favor ofDiagnosticListener.v8.4.0experimental_member_usewarning, which warns about any reference toa declaration annotated with
@experimental.TypeAliasElement.aliasedElement, usealiasedTypeinstead.v8.3.0TypeDefiningElement, check for specific elements.TypeDefiningFragment, check for specific fragments.PartDirective.configurations, removed from the specification.v8.2.0^3.9.0.Diagnostic.data. Instead, please use an expando to attach data tothe
Diagnosticobject.CatchClauseParameter.declaredElementandCatchClauseParameter.declaredElement2.Use
CatchClauseParameter.declaredFragmentinstead.DeclaredIdentifier.declaredElementandDeclaredIdentifier.declaredElement2.Use
DeclaredIdentifier.declaredFragmentinstead.DeclaredVariablePattern.declaredElementandDeclaredVariablePattern.declaredElement2.Use
DeclaredVariablePattern.declaredFragmentinstead.VariableDeclaration.declaredElementandVariableDeclaration.declaredElement2.Use
VariableDeclaration.declaredFragmentinstead.InterfaceFragment.interfaces, useInterfaceElement.interfacesinstead.InterfaceFragment.mixins, useInterfaceElement.mixinsinstead.InterfaceFragment.supertype, useInterfaceElement.supertypeinstead.ExtensionTypeFragment.primaryConstructor, useExtensionTypeElement.primaryConstructor.ExtensionTypeFragment.representation, useExtensionTypeElement.representation.NullShortableExpression. This interface should not be needed byanalyzer clients, and is no longer supported.
v8.1.1EnumSetusage when compiled to JavaScript.v8.1.0DartObject.constructorInvocationwith the constructor and arguments.PropertyAccessorElement.variablenon-nullable.documentationCommenttoElementandFragment.metadatatoElementandFragment.metadatatoElementDirective.partKeywordOffsettoPartInclude.package:build.LibraryElementResult.element2, useelementinstead.ResolvedLibraryResult.element2, useelementinstead.ResolvedUnitResult.libraryElement2, uselibraryElementinstead.AnalysisSession.getParsedLibraryByElement2, usegetParsedLibraryByElementinstead.AnalysisSession.getResolvedLibraryByElement2, usegetResolvedLibraryByElementinstead.resolveFile2, useresolveFileinstead.DartObject.variable2, usevariableinstead.DartObject.toFunctionValue2, usetoFunctionValueinstead.Annotatable, usedocumentationCommentandmetadataofElementorFragmentdirectly.ClassElement.isExtendableIn; useisExtendableOutsideinstead.ClassElement.isImplementableIn; useisImplementableOutsideinstead.ClassElement.isMixableIn; useisMixableOutsideinstead.MixinElement.isImplementableIn; useisImplementableOutsideinstead.v8.0.0DartType.isStructurallyEqualTo.RecordType.positionalTypes.RecordType.sortedNamedTypes.ElementLocationclass; its values are not returned anymore.AnalysisContext.analysisOptions.PromotableElementandPromotableFragment.LocalVariableElement.hasInitializer.LocalVariableFragment.hasInitializer.LocalVariableFragment.nameOffset.JoinPatternVariableFragment.isConsistent.JoinPatternVariableFragment.variables2.VariableElement.constantInitializer2.VariableFragment.initializer.ConstantInitializer.HasSinceSdkVersion.LibraryFragmentis notAnnotatableanymore.ConstantEvaluationTargetbyElementAnnotation.This is an internal interface that should not have been exposed.
element2.dartlibrary; importelement.dart.XyzElement2classes; useXyzElementinstead.AnalysisError.correctionfield; useAnalysisError.correctionMessageinstead.AnalysisError; useDiagnosticinstead.ErrorCode; useDiagnosticCodeinstead.ErrorReporter.atOffset'serrorCodeparameter; usediagnosticCodeinstead.ErrorSeverity; useDiagnosticSeverityinstead.DiagnosticCode.errorSeverity; useDiagnosticCode.diagnosticSeverityinstead.AnalysisErrorListener,BooleanErrorListener, andRecordingErrorListener; useDiagnosticListener,BooleanDiagnosticListener, andRecordingDiagnosticListenerrespectively,instead. Instead of calling or overriding
AnalysisErrorListener.onError,call or override
DiagnosticListener.onDiagnostic. Instead of usingAnalysisErrorListener.NULL_LISTENER, useDiagnosticListener.nullListener.RecordingErrorListener.errors; useRecordingDiagnosticListener.diagnosticsinstead.RecordingErrorListener.getErrorsForSource; no longer supported.AnalysisResultWithErrors; useAnalysisResultWithDiagnosticsinstead.
AnalysisResultWithErrors.errors; useAnalysisResultWithErrors.diagnosticsinstead.ErrorType; useDiagnosticTypeinstead.ElementDirectivefromsealedtoabstract.This allows the analyzer to have an internal implementation
class corresponding to
ElementDirective.NamedType.name2, usenameinstead.ClassElement.isXyzIn2, useisXyzIninstead.Element.enclosingElement2, useenclosingElementinstead.InstanceElement.fields2, usefieldsinstead.InstanceElement.getters2, usegettersinstead.InstanceElement.setters2, usesettersinstead.InstanceElement.methods2, usemethodsinstead.InstanceElement.getField2, usegetFieldinstead.InstanceElement.getGetter2, usegetGetterinstead.InstanceElement.getSetter2, usegetSetterinstead.InstanceElement.getMethod2, usegetMethodinstead.InstanceFragment.fields2, usefieldsinstead.InstanceFragment.methods2, usemethodsinstead.InterfaceElement.constructors2, useconstructorsinstead.InterfaceFragment.constructors2, useconstructorsinstead.JoinPatternVariableElement.variables2, usevariablesinstead.Annotatable.metadata2, usemetadatainstead.Element.nonSynthetic2, usenonSyntheticinstead.Element.library2, uselibraryinstead.ExtensionTypeElement.primaryConstructor2, useprimaryConstructorinstead.ExtensionTypeElement.representation2, userepresentationinstead.ExtensionTypeFragment.primaryConstructor2, useprimaryConstructorinstead.ExtensionTypeFragment.representation2, userepresentationinstead.InterfaceType.getGetter2, usegetGetterinstead.InterfaceType.getMethod2, usegetMethodinstead.InterfaceType.getSetter2, usegetSetterinstead.InterfaceType.lookUpConstructor2, uselookUpConstructorinstead.InterfaceType.lookUpGetter3, uselookUpGetterinstead.InterfaceType.lookUpMethod3, uselookUpMethodinstead.InterfaceType.lookUpSetter3, uselookUpSetterinstead.PropertyAccessorFragmentImplImplicitGetter,PropertyAccessorFragmentImplImplicitSetter,and
FormalParameterFragmentImplOfImplicitSetter, replace withGetterFragmentImpl, andSetterFragmentImpl.ExtensionTypeFragment.representation2, userepresentationinstead.DartType.element3, useelementinstead.LibraryElement.loadLibraryFunction2, useloadLibraryFunctioninstead.InterfaceType.constructors2, useconstructorsinstead.Element.accept2, useacceptinstead.InstantiatedTypeAliasElement.element2, useelementinstead.TypeProvider.boolElement2, useboolElementinstead.TypeProvider.doubleElement2, usedoubleElementinstead.TypeProvider.enumElement2, useenumElementinstead.TypeProvider.futureElement2, usefutureElementinstead.TypeProvider.futureOrElement2, usefutureOrElementinstead.TypeProvider.intElement2, useintElementinstead.TypeProvider.iterableElement2, useiterableElementinstead.TypeProvider.listElement2, uselistElementinstead.TypeProvider.mapElement2, usemapElementinstead.TypeProvider.nullElement2, usenullElementinstead.TypeProvider.numElement2, usenumElementinstead.TypeProvider.objectElement2, useobjectElementinstead.TypeProvider.recordElement2, userecordElementinstead.TypeProvider.setElement2, usesetElementinstead.TypeProvider.streamElement2, usestreamElementinstead.TypeProvider.stringElement2, usestringElementinstead.TypeProvider.symbolElement2, usesymbolElementinstead.Annotation.element2, useelementinstead.LibraryDirective.name2, usenameinstead.CatchClauseParameter.declaredElement2, usedeclaredElementinstead.CompoundAssignmentExpression.readElement2, usereadElementinstead.CompoundAssignmentExpression.writeElement2, usewriteElementinstead.DeclaredIdentifier.declaredElement2, usedeclaredElementinstead.DeclaredVariablePattern.declaredElement2, usedeclaredElementinstead.EnumConstantDeclaration.constructorElement2, useconstructorElementinstead.ExtensionOverride.element2, useelementinstead.FunctionBody.isPotentiallyMutatedInScope2, useisPotentiallyMutatedInScopeinstead.ImportPrefixReference.element2, useelementinstead.LibraryDirective.element2, useelementinstead.LibraryDirective.name2, usenameinstead.NamedExpression.element2, useelementinstead.NamedType.element2, useelementinstead.PatternField.element2, useelementinstead.RelationalPattern.element2, useelementinstead.VariableDeclaration.declaredElement2, usedeclaredElementinstead.InterfaceType.methods2, usemethodsinstead.Fragment.name2, usenameinstead.Element.name3, usenameinstead.ConstructorElement.redirectedConstructor2, useredirectedConstructorinstead.ConstructorElement.superConstructor2, usesuperConstructor˙instead.Element.children2, usechildreninstead.Element.displayString2, usedisplayStringinstead.Element.getExtendedDisplayName2, usegetExtendedDisplayNameinstead.Element.isAccessibleIn2, useisAccessibleIninstead.Element.thisOrAncestorMatching2, usethisOrAncestorMatchinginstead.Element.thisOrAncestorOfType2, usethisOrAncestorOfTypeinstead.EnumElement.constants2, useconstantsinstead.FieldFormalParameterElement.field2, usefieldinstead.FormalParameterElement.typeParameters2, usetypeParametersinstead.Fragment.children3, usechildreninstead.DartType.asInstanceOf2, useasInstanceOfinstead.TypeSystem.instantiateInterfaceToBounds2, useinstantiateInterfaceToBoundsinstead.TypeSystem.instantiateTypeAliasToBounds2, useinstantiateTypeAliasToBoundsinstead.FormalParameterElement.appendToWithoutDelimiters, useappendToWithoutDelimitersinstead.GetterElement.correspondingSetter2, usecorrespondingSetterinstead.InterfaceElement.unnamedConstructor2, useunnamedConstructorinstead.InterfaceElement.getNamedConstructor2, usegetNamedConstructorinstead.TypeParameterizedElement.typeParameters2, usetypeParametersinstead.FormalParameterElement.appendToWithoutDelimiters2, useappendToWithoutDelimitersinstead.GetterElement.correspondingSetter2, usecorrespondingSetterinstead.InterfaceElement.unnamedConstructor2, useunnamedConstructorinstead.InterfaceElement.getNamedConstructor2, usegetNamedConstructorinstead.LibraryElement.entryPoint2, useentryPointinstead.LibraryElement.exportedLibraries2, useexportedLibrariesinstead.LibraryElement.getClass2, usegetClassinstead.LibraryElement.getEnum2, usegetEnuminstead.LibraryElement.getMixin2, usegetMixininstead.LibraryExport.exportedLibrary2, useexportedLibraryinstead.LibraryFragment.accessibleExtensions2, useaccessibleExtensionsinstead.LibraryFragment.importedLibraries2, useimportedLibrariesinstead.LibraryImport.importedLibrary2, useimportedLibraryinstead.MixinElement.isImplementableIn2, useisImplementableIninstead.PatternVariableElement.join2, usejoininstead.PropertyAccessorElement.variable3, usevariableinstead.PropertyInducingElement.getter2, usegetterinstead.PropertyInducingElement.setter2, usesetterinstead.SetterElement.correspondingGetter2, usecorrespondingGetterinstead.SuperFormalParameterElement.superConstructorParameter2, usesuperConstructorParameterinstead.TypeAliasElement.aliasedElement2, usealiasedElementinstead.TypeParameterizedElement.typeParameters2, usetypeParametersinstead.VariableElement.constantInitializer2, useconstantInitializerinstead.TypeProvider.isNonSubtypableClass2, useisNonSubtypableClassinstead.EnumFragment.constants2, useconstantsinstead.InterfaceElement.lookUpInheritedMethod2, uselookUpInheritedMethodinstead.LibraryFragment.classes2, useclassesinstead.LibraryFragment.enums2, useenumsinstead.LibraryFragment.extensionTypes2, useextensionTypesinstead.LibraryFragment.extensions2, useextensionsinstead.LibraryFragment.functions2, usefunctionsinstead.LibraryFragment.libraryExports2, uselibraryExportsinstead.LibraryFragment.libraryImports2, uselibraryImportsinstead.LibraryFragment.mixins2, usemixinsinstead.LibraryFragment.topLevelVariables2, usetopLevelVariablesinstead.LibraryFragment.typeAliases2, usetypeAliasesinstead.PatternVariableFragment.join2, usejoininstead.LibraryFragment.isNonSubtypableClass2, useisNonSubtypableClassinstead.TypeParameterizedFragment.typeParameters2, usetypeParametersinstead.Fragment.nameOffset2, usenameOffsetinstead.DirectiveUriWithLibrary.library2, uselibraryinstead.ElementAnnotation.element2, useelementinstead.LibraryImport.prefix2, useprefixinstead.MultiplyDefinedElement.conflictingElements2, useconflictingElementsinstead.ScopeLookupResult.getter2, usegetterinstead.ScopeLookupResult.setter2, usesetterinstead.v7.7.0HasSinceSdkVersion, useElement2.sinceSdkVersion.v7.6.0VariableElement.constantInitializer2, useconstantInitializerinstead.VariableFragment.initializer, useVariableElement.constantInitializerinstead.ConstantInitializer.v7.5.9JoinPatternVariableFragment.isConsistentandvariables2.Use corresponding properties of
JoinPatternVariableElement2instead.v7.5.8Cherry-pick https://dart-review.googlesource.com/c/sdk/+/439820
v7.5.7LocalVariableFragment.nameOffset, usenameOffset2instead.v7.5.6EnumFragment.constants2, useEnumElement2.constants2instead.v7.5.5LocalVariableElement.hasInitializerandLocalVariableFragment.hasInitializer.This property is not useful and was not de-facto used.
v7.5.4PromotableFragmentandPromotableElement.These interfaces are implementation details.
v7.5.3AugmentedExpressionandAugmentedInvocation.This feature was removed from the specification.
v7.5.2LibraryElement.identifier, useuriinstead.LibraryElement2.identifier, useuriinstead.v7.5.1ConstantEvaluationTargetitself, and its methods.AnalysisTarget.api.txtmanifest.v7.5.0ElementAnnotationfromConstantEvaluationTarget.ElementAnnotationwill stop implementingConstantEvaluationTarget.ElementAnnotation.libraryFragment, as the replacement for thedeprecations above. It provides enough information about the location.
v7.4.6PropertyAccessorFragment.variable3.Use
PropertyAccessorElement2.variable3instead.PropertyInducingFragment.getter2.Use
PropertyInducingElement2.getter2instead.PropertyInducingFragment.setter2.Use
PropertyInducingElement2.setter2instead.v7.4.5v7.4.4LabelElement2.v7.4.3v7.4.2PrefixElement2.v7.4.1InstanceElement.augmentedgetter.This API was removed in 7.4.0 under the assumption that its removal would
not be a breaking change, because it was marked as
@experimental.But it turns out that some clients had been published to pub that relied
on it. So, these APIs were restored, and implemented on top of
Element2.v7.4.0^3.5.0.See migration guide.
v7.3.0flagsoptional named parameter toFeatureSet.latestLanguageVersion().v7.2.0ElementDirectiveas superinterface forLibraryExport,LibraryImport,and
PartInclude. It implementsAnnotatable.v7.1.0v7.0.0DartType.element2.DartType.isDynamic.DartType.isVoid.DartType.resolveToBound.IfElement.condition.IfStatement.condition.AstNode.getPropertyandAstNode.setProperty.File.createSource(), it violates levels of abstraction.You can get
Sourceinstances fromAnalysisResults.LibraryElement.toLegacyTypeIfOptOut.LibraryElement.toLegacyElementIfOptOut.LibraryElement.isNonNullableByDefault.File.changesandFolder.changes.Resource.parent2.OnClause.ContextBuilder, useAnalysisContextCollection.ContextLocator, useAnalysisContextCollection.ClassOrAugmentationDeclaration..MixinOrAugmentationDeclaration..AnalysisError.TypeSystem.instantiateToBounds2.buildSdkSummary2().FileSource.fileReadMode.ErrorReporter.Comment.isBlock,isDocumentation,isEndOfLine.Element.enclosingElement.PropertyAccessor.variable.LibraryOrAugmentationElement.LibraryElementproperties.enabledPluginNamesandhintfromAnalysisOptions.source_io.dart.lint/Spelunker.source_resource.dart.MultiplyInheritedExecutableElement.AnalyzeFunctionBodiesPredicate.normalParameterNamesandoptionalParameterNamesfromFunctionType.v6.11.0LibraryElement.exportedLibraries.LibraryElement.importedLibraries.v6.10.0LibraryElement.accessibleExtensions, useCompilationUnitElement.accessibleExtensionsinstead.LibraryElement.exportedLibraries.LibraryElement.importedLibraries.LibraryElement.isBrowserApplication.LibraryElement.libraryExports,use
CompilationUnitElement.libraryExportsinstead.LibraryElement.libraryImports,use
CompilationUnitElement.libraryImportsinstead.LibraryElement.prefixes,use
CompilationUnitElement.libraryImportPrefixesinstead.LibraryElement.parts,use
CompilationUnitElement.partsinstead.LibraryElement.scope,use
CompilationUnitElement.scopeinstead.v6.9.0NormalFormalParameternow implementsAnnotatedNode.Element.enclosingElement, useenclosingElement3.v6.8.0AnalysisContextCollection.dispose(). It must be invoked at the end.ContextLocatorandContextBuilder.Use
AnalysisContextCollectioninstead.v6.7.0File.createSource(), it violates levels of abstraction.You can get
Sourceinstances fromAnalysisResults.AnalysisError.v6.6.0src/file_system/file_system.dartfrom
file_system/file_system.dart.package:analyzer/src/source/source_resource.dart,import
package:analyzer/source/file_source.dartinstead.package:analyzer/src/source/source.dart,import
package:analyzer/source/source.dartinstead.v6.5.2macros: '>=0.1.2-0 <0.1.3'.v6.5.1macros: '>=0.1.1-0 <0.1.2'.v6.5.0LibraryElement.toLegacyTypeIfOptOut.LibraryElement.toLegacyElementIfOptOut.LibraryElement.isNonNullableByDefault.InterfaceElement.lookUpGetter,InterfaceElement.lookUpMethod,and
InterfaceElement.lookUpSetter.GeneralizingAstVisitor.visitNamedTypeto invokevisitTypeAnnotation.PropertyInducingElement get variableinPropertyAccessorElement,use
PropertyInducingElement? get variable2instead.The reason for this is that when the property accessor is an augmentation
without the corresponding declaration, there is no corresponding variable.
ExtensionDeclaration.onKeywordandextendedType.Use
ExtensionOnClause? get onClauseinstead.Extension augmentations are not allowed to have
onClause.OnClause, useMixinOnClauseinstead.@doNotSubmit.@mustBeConst.constructor,directive,enumValue, andtypeParameter.AstNode.getPropertyandAstNode.setProperty. Clients who needthe ability to add arbitrary decorations to AST nodes can achieve the same
effect using Dart's built-in
Expando class.
v6.4.1v6.3.03.3.ConstantEvaluator.v6.2.0v6.1.0InstanceElement, a super-interface forInterfaceElementand
ExtensionElement.TypeSystem.greatestLowerBound.v6.0.0declaredElement2from AST.element2from AST.name2from AST.FunctionBody.isPotentiallyMutatedInClosure.extensionName,staticElementfromExtensionOverride.namefromNamedType.v5.13.0InvalidTypeis now used when types or property cannot be resolved.Previously
DynamicTypewas used.v5.12.0DartType.isDynamic, useis DynamicTypeinstead.NamedTypeto useimportPrefixandname2token.The deprecated
namenode is still visited in this version, but will stopin the next major version.
ExtensionOverrideto useimportPrefixandnametoken.The deprecated
extensionNamenode is still visited in this version, butwill stop in the next major version.
AnalysisErrorconstructor, usetmpconstructor,with names formal parameters. Theoretically no clients should use either,
but practically there are two uses currently.
InvalidType, used when a named type cannot be resolved, or aproperty cannot be resolved, etc. Previously
DynamicTypewas used.In the future
DynamicTypewill be used only when specified explicitly,or a property is resolved against a dynamic target. The clients should
prepare by checking also for
InvalidTypein addition toDynamicType.v5.11.1finalKeyword,interfaceKeywordandsealedKeywordofMixinElement. We added them preliminary whileworking on the class modifiers feature, but eventually decided to remove.
See #52159 for details.
v5.11.0@experimentalfrom AST nodes and elements for records and patterns.IfStatement.condition, useexpressioninstead.NamedType.importPrefix,NamedType.name2, andNamedType.element.Deprecated
NamedType.name. CurrentlyIdentifieris an expression, andan expression as a name of a type does not make sense. So, instead we model
it as a name token, the
Elementthat it references, and an optional importlibrary prefix reference.
v5.10.0DartType.isDartCoreType.v5.9.0FunctionBody.isPotentiallyMutatedInClosure, not used by clients.FunctionBody.isPotentiallyMutatedInScopeand pattern assignment.v5.8.0DartType.isVoid, useis VoidTypeinstead.records,patterns, andclass-modifiersfeatures enabled by default.v5.7.1>=2.19.0 <3.0.0to usePathNotFoundExceptionfromdart:io.v5.6.0DartPattern.precedence.v5.5.0RecordPatternFieldtoPatternField.RecordPatternFieldNametoPatternFieldName.v5.4.0v5.3.1collection: ^1.17.0because we useelementAtOrNull.v5.2.0Element.enclosingElement3, useenclosingElementinstead.Directive.element2, useelementinstead.CatchClause.exceptionParameter2, useexceptionParameterinstead.CatchClause.stackTraceParameter2, usestackTraceParameterinstead.DartType.element2, useelementinstead.Element.isAccessibleIn2(), useisAccessibleIn()instead.CompilationUnitElement.enums2, useenumsinstead.CompilationUnitElement.getEnum2(), usegetEnum()instead.CompilationUnitElement.mixins2, usemixinsinstead.LibraryElement.parts2, usepartsinstead.ImportElement.imports2, useimportsinstead.AnalysisDriverForPackageBuild.sdkLibraryUris.buildSdkSummary2(), usebuildSdkSummary()instead.v5.1.0AstNode.name2, usenameinstead.AstNode.declaredElement2, usedeclaredElementinstead.v5.0.0DiagnosticMessage.message.LibraryElement.getImportsWithPrefix().ParameterElement.isNotOptional.DartType.displayName.AnalysisDriver.ClassOrMixinDeclaration.Declaration.declaredElement.Element.enclosingElementandenclosingElement2.ExportElement,ImportElement.NamedCompilationUnitMember.name.Declaration.declaredElement.DartType.element.Configuration
📅 Schedule: (in timezone Africa/Johannesburg)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.