Update dependency analyzer to v8 #28
Open
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:
^0.39.5->^8.0.0Release Notes
dart-lang/sdk (analyzer)
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.v4.7.0addXyztoNodeLintRegistry.lookUpInheritedConcreteX()toInterfaceElement.v4.6.0DartType.element2, so thatInterfaceType.element2overrides it.v4.5.0FormalParameter.identifier.ClassOrMixinDeclaration, useClassDeclarationandMixinDeclarationdirectly.Declaration.declaredElement, usedeclaredElement2instead.This is necessary to separate
ClassElement,EnumElement, andMixinElement.And, in the future, augmentations like
ClassAugmentationElement, etc.TypeSystem.instantiateToBounds2(), useinstantiateInterfaceToBounds()orinstantiateTypeAliasToBounds()instead.v4.4.0ClassDeclaration.isAbstract, useabstractKeywordinstead.ClassTypeAlias.isAbstract, useabstractKeywordinstead.ClassOrMixinDeclaration.getField, filtermembersinstead.ClassOrMixinDeclaration.getMethod, filtermembersinstead.ClassDeclaration.getConstructor, filtermembersinstead.Directive.element, useelement2instead.ClassElement.hasStaticMember, it is not useful for clients.NamespaceDirective.uriElement, useelement2.uriwithDirectiveUriWithLibraryinstead.UriBasedDirective.uriContent,UriBasedDirective.uriElement,UriBasedDirective.uriSource.Use
Directive.element2.uriinstead.NamespaceDirective.selectedSource, useelement2.uriwithDirectiveUriWithSourceinstead.Configuration.uriSource, useresolvedUriinstead.CatchClause.exceptionParameterandCatchClause.stackTraceParameter.Use
exceptionParameter2andstackTraceParameter2instead.FileResult.isAugmentationandisLibraryto complementisPart.name2anddeclaredElementinstead.Element.enclosingElement2, useenclosingElement3instead. The meaningful change is thatConstructorElement.enclosingElement3returns nowInterfaceElement, notClassElement.get enums/mixin, useget enums2/mixins2instead.DartType.element, check forInterfaceType,TypeParameterType, and then ask the element.ClassElement.isEnumandisMixin. Check foris EnumElementandis MixinElementinstead.LibraryElement.getType()usegetClass()instead.v4.3.1identifierforLibraryExportElementandLibraryImportElement.v4.3.0Directive.keyword, use correspondingxyzTokenin specific directives.LibraryElement.parts, useparts2instead.LibraryElement.exports, uselibraryExportsinstead.LibraryElement.imports, uselibraryImportsinstead.Element.enclosingElement, useenclosingElement2instead.Memberis not equal toElementImpl, useElement.declaration.v4.2.0>=2.17.0 <3.0.0.ImportDirective.COMPARATOR, use appropriate custom logic, if necessary.Element.isAccessibleIn(), useisAccessibleIn2()instead.v4.1.0ParameterElement.isNotOptional, useisRequiredinstead.ResourceProviderMixin.newFile2, usenewFileinstead.ResourceProviderMixin.newAnalysisOptionsYamlFile2, usenewAnalysisOptionsYamlFileinstead.DartType.resolveToBound, useTypeSystem.resolveToBoundinstead.LibraryElement.getImportsWithPrefix, usePrefixElement.importsinstead.AnalysisSession.getFile()to return updated content afterapplyPendingFileChanges.v4.0.0UriKindandSource.uriKind.LibraryElement.hasExtUri.LibraryElement.hasLoadLibraryFunction.ImportElement.prefixOffset.CompilationUnitElement.types.Source.encoding.Source.isInSystemLibrary.Source.modificationStamp.stampinMemoryResourceProvider.SourceFactory.restoreUri, usepathToUriinstead.AnalysisContext.workspace.isNonNullableByDefaultparameter inErrorReporteris now required.Element.SORT_BY_OFFSET, it is not used.AnalysisSession.getFileandgetParsedUnitto failif there are pending file changes, instead of reading. As for any other
AnalysisSessionmethod, awaitAnalysisContext.applyPendingFileChanges().Token.copy()andcopyComments().CommentToken.remove().astFactoryandAstFactory.AnalysisOptions.signatureandsignaturesEqual.buildSdkSummary().v3.4.1Compare Source
AnalysisSession.v3.4.0Compare Source
Resource.parent2, useparentinstead.astFactory, clients should not create AST nodes manually.CompilationUnit.lineInfoto be non-nullable.CompilationUnitElement.lineInfoto be non-nullable.ResourceProviderMixin.newFile, usenewFile2instead.ResourceProviderMixin.newAnalysisOptionsYamlFile.AnalysisContext.changeFileandAnalysisContext.applyPendingFileChanges.buildSdkSummary, use asynchronousbuildSdkSummary2instead.v3.3.1Compare Source
v3.3.0Compare Source
getFieldtoExtensionElement.isGenerativetoConstructorElement.isDartCoreEnumtoClassElementandDartType.superclass2,mixinTypes2, etc. Usesuperclass,mixinTypes, etc.enhanced-enumslanguage feature.v3.2.0Compare Source
changesgetter inFileandFolder, usewatch()instead.v3.1.0Compare Source
package:dart_style.MockSdkclass.AnalysisDriverconstructor.2.17.v3.0.0DartType.aliasElement/aliasArguments.FeatureSet.UnitElementResult.signature- unused by clients.AnalysisError.withNamedArguments.ErrorReporter.reportErrorMessage.ResourceProvider.getModificationTimes().MemoryResourceProvider.newDummyLink().MemoryResourceProvider.updateFile().Resource.parent.ResultStateandAnalysisResult.state.summary_file_builderlibrary.messageandcorrectionfromErrorCode.lookUpmethods fromInterfaceType.InterfaceType.getSmartLeastUpperBound.pathandurifromAnalysisResult.AnalysisSession.TypeNameand corresponding methods.TypeProvider.v2.8.0getXyzmethods inAnalysisDriver.doublein mock SDK.pathandurifromAnalysisResult.UriResolver.restoreAbsolute, usepathToUriinstead.SourceFactory.restoreAbsolute, usepathToUriinstead.UriKindandSource.uriKind.Source.modificationStamp.Source.isInSystemLibrary, useuri.isScheme('dart')instead.v2.7.0Compare Source
ConstructorElement.displayNameto eitherClassorClass.constructor.InterfaceType.getSmartLeastUpperBound, useTypeSystem.leastUpperBoundinstead.MockSdk, usecreateMockSdkandFolderBasedDartSdkinstead.v2.6.0Compare Source
AnalysisResult.state, check for specific valid or invalid subtypes.ResultState.LibraryElement.hasExtUri, FFI should be used instead.v2.5.0Compare Source
MockSdkto include more declarations.v2.4.0Compare Source
ResourceProvider.getModificationTimes().MemoryResourceProvider.newDummyLink().MemoryResourceProvider.updateFile().TypeName, useNamedTypeinstead.AstVisitor.visitNamedType()instead ofvisitTypeName().ClassTypeAlias.superclass, usesuperclass2instead.ConstructorName.type, usetype2instead.ExtendsClause.superclass, usesuperclass2instead.ImplementsClause.interfaces, useinterfaces2instead.OnClause.superclassConstraints, usesuperclassConstraints2instead.TypeLiteral.typeName, usetypeinstead.WithClause.mixinTypes, usemixinTypes2instead.AstFactory.typeName(), usenamedType()instead.v2.3.0Compare Source
constructor-tearoffsfeature by default in2.15.v2.2.0Compare Source
v2.1.0Compare Source
AnalysisResult.pathto be non-nullable.ParsedLibraryResult.unitsto be non-nullable.ResolvedLibraryResult.elementto be non-nullable.ResolvedLibraryResult.unitsto be non-nullable.ResolvedUnitResult.contentto be non-nullable.ResolvedUnitResult.unitto be non-nullable.AnalysisSession.getXyz2()intogetXyz().AnalysisDriver.resultstoStream<Object>.It used to always produce
ResolvedUnitResults, but sometimes itscontentandunitwerenull, when the result actually had only errors.Now it produces either
ResolvedUnitResult, orErrorsResult, orsome other results that might be added in the future.
DartType.aliaswith information about instantiated type alias.The type alias element and arguments are present or absent together.
DartType.aliasElementandDartType.aliasArguments.2.15.v2.0.0Compare Source
Scope.lookup2().FunctionTypeAliasElement.LineInfo.getLocation()to returnCharacterLocation.LineInfo_Location.AnalysisSession.DartObject.typefromParameterizedType?toDartType?.FunctionTypeto implementDartType, notParameterizedType.FunctionType.elementandFunctionType.typeArguments.DartObject.typefromParameterizedType?toDartType?.FunctionTypeto implementDartType, notParameterizedType.FunctionType.elementandFunctionType.typeArguments.StringInterpolation.firstStringandlastString, to expressexplicitly that there are always (possibly empty) strings as the first
and the last elements of an interpolation.
ImportElement.prefixOffset, useprefix.nameOffsetinstead.CompilationUnitElement.types, useclassesinstead.Element.nonSynthetic, use it to get the element that caused creationof this element, e.g. the field for a synthetic getter.
FieldElement.isFinalistrueonly when the field is not synthetic.-1asnameOffset.defaultValueCodeisnullfor field formal parameters.LibraryElement.nameso that it is non-nullable.v1.7.2Compare Source
v1.7.1Compare Source
v1.7.0Compare Source
meta: ^1.4.0.v1.6.0Compare Source
AnalysisDriverdefault constructor. Addedtmp1. The goalis to allow deprecating and removing unused parameters.
tearoffs" feature:
ConstructorReference,FunctionReference, andTypeLiteral.v1.5.0Compare Source
2.14.AnalysisSession.getUnitElement().Use
AnalysisSession.getUnitElement2()instead.AnalysisSession.getResolvedUnit().Use
AnalysisSession.getResolvedUnit2()instead.AnalysisSession.getResolvedLibrary().Use
AnalysisSession.getResolvedLibrary2()instead.AnalysisSession.getResolvedLibraryByElement().Use
AnalysisSession.getResolvedLibraryByElement2()instead.AnalysisSession.getLibraryByUri().Use
AnalysisSession.getLibraryByUri2()instead.AnalysisSession.getErrors().Use
AnalysisSession.getErrors2()instead.AnalysisSession.getParsedLibrary().Use
AnalysisSession.getParsedLibrary2()instead.AnalysisSession.getParsedLibraryByElement().Use
AnalysisSession.getParsedLibraryByElement2()instead.AnalysisSession.getParsedUnit().Use
AnalysisSession.getParsedUnit2()instead.AnalysisSession.getFile()andgetSourceKind().Use
AnalysisSession.getFile2()instead.AnalysisSession.getUnitElementSignature().This method is not used by any known client, and will be removed.
v1.4.0Compare Source
TypeProvider.nonSubtypableClasses.Use
TypeProvider.isNonSubtypableClassinstead.sdkPathtoAnalysisContextCollectionconstructor.nonfunction-type-aliasesis enabled by default in thelanguage version
2.13.v1.3.0Compare Source
Expression.inConstantContextto API.null.CompilationUnitElement.mixinsbeforetypes.v1.2.0Compare Source
parseString()instead.AnalysisSession.getErrors()does not returnnull, check itsstate.aliasElementandaliasArgumentsfor aliases ofInterfaceTypes andTypeParameterTypes.v1.1.0TypeProvider.futureType2(),iterableType2(), etc.Use corresponding
TypeProvider.futureType(),iterableType(), etc.Resource.parent2and deprecatedResource.parent.Folder.isRoot.FolderExtensionwithwithAncestors.ContextRoot.workspace, deprecatedAnalysisContext.workspace.ElementVisitor.visitFunctionTypeAliasElement().Override
ElementVisitor.visitTypeAliasElement()instead.FunctionTypeAliasElement. UseTypeAliasElementinstead.v1.0.0v0.41.1PackageBuildWorkspacethat supportspackage:buildto stopat the first directory with
pubspec.yaml, and don't try to go upand find another one with both
pubspec.yamland.dart_tool/build.ErrorCodeclass. It will be used tomigrate existing
ErrorCodesubclasses, and then deprecated and removed.v0.41.0Scope.lookup({id, setter})withlookup(id).Scope.lookup2(id), uselookup()instead.Member.baseElement.package:analyzer/analyzer.dartlibrary.ElementAnnotation.constantValue.VariableElement.constantValue.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.