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.0
Release Notes
dart-lang/sdk (analyzer)
v8.0.0
DartType.isStructurallyEqualTo
.RecordType.positionalTypes
.RecordType.sortedNamedTypes
.ElementLocation
class; its values are not returned anymore.AnalysisContext.analysisOptions
.PromotableElement
andPromotableFragment
.LocalVariableElement.hasInitializer
.LocalVariableFragment.hasInitializer
.LocalVariableFragment.nameOffset
.JoinPatternVariableFragment.isConsistent
.JoinPatternVariableFragment.variables2
.VariableElement.constantInitializer2
.VariableFragment.initializer
.ConstantInitializer
.HasSinceSdkVersion
.LibraryFragment
is notAnnotatable
anymore.ConstantEvaluationTarget
byElementAnnotation
.This is an internal interface that should not have been exposed.
element2.dart
library; importelement.dart
.XyzElement2
classes; useXyzElement
instead.AnalysisError.correction
field; useAnalysisError.correctionMessage
instead.AnalysisError
; useDiagnostic
instead.ErrorCode
; useDiagnosticCode
instead.ErrorReporter.atOffset
'serrorCode
parameter; usediagnosticCode
instead.ErrorSeverity
; useDiagnosticSeverity
instead.DiagnosticCode.errorSeverity
; useDiagnosticCode.diagnosticSeverity
instead.AnalysisErrorListener
,BooleanErrorListener
, andRecordingErrorListener
; useDiagnosticListener
,BooleanDiagnosticListener
, andRecordingDiagnosticListener
respectively,instead. Instead of calling or overriding
AnalysisErrorListener.onError
,call or override
DiagnosticListener.onDiagnostic
. Instead of usingAnalysisErrorListener.NULL_LISTENER
, useDiagnosticListener.nullListener
.RecordingErrorListener.errors
; useRecordingDiagnosticListener.diagnostics
instead.RecordingErrorListener.getErrorsForSource
; no longer supported.AnalysisResultWithErrors
; useAnalysisResultWithDiagnostics
instead.
AnalysisResultWithErrors.errors
; useAnalysisResultWithErrors.diagnostics
instead.ErrorType
; useDiagnosticType
instead.ElementDirective
fromsealed
toabstract
.This allows the analyzer to have an internal implementation
class corresponding to
ElementDirective
.NamedType.name2
, usename
instead.ClassElement.isXyzIn2
, useisXyzIn
instead.Element.enclosingElement2
, useenclosingElement
instead.InstanceElement.fields2
, usefields
instead.InstanceElement.getters2
, usegetters
instead.InstanceElement.setters2
, usesetters
instead.InstanceElement.methods2
, usemethods
instead.InstanceElement.getField2
, usegetField
instead.InstanceElement.getGetter2
, usegetGetter
instead.InstanceElement.getSetter2
, usegetSetter
instead.InstanceElement.getMethod2
, usegetMethod
instead.InstanceFragment.fields2
, usefields
instead.InstanceFragment.methods2
, usemethods
instead.InterfaceElement.constructors2
, useconstructors
instead.InterfaceFragment.constructors2
, useconstructors
instead.JoinPatternVariableElement.variables2
, usevariables
instead.Annotatable.metadata2
, usemetadata
instead.Element.nonSynthetic2
, usenonSynthetic
instead.Element.library2
, uselibrary
instead.ExtensionTypeElement.primaryConstructor2
, useprimaryConstructor
instead.ExtensionTypeElement.representation2
, userepresentation
instead.ExtensionTypeFragment.primaryConstructor2
, useprimaryConstructor
instead.ExtensionTypeFragment.representation2
, userepresentation
instead.InterfaceType.getGetter2
, usegetGetter
instead.InterfaceType.getMethod2
, usegetMethod
instead.InterfaceType.getSetter2
, usegetSetter
instead.InterfaceType.lookUpConstructor2
, uselookUpConstructor
instead.InterfaceType.lookUpGetter3
, uselookUpGetter
instead.InterfaceType.lookUpMethod3
, uselookUpMethod
instead.InterfaceType.lookUpSetter3
, uselookUpSetter
instead.PropertyAccessorFragmentImplImplicitGetter
,PropertyAccessorFragmentImplImplicitSetter
,and
FormalParameterFragmentImplOfImplicitSetter
, replace withGetterFragmentImpl
, andSetterFragmentImpl
.ExtensionTypeFragment.representation2
, userepresentation
instead.DartType.element3
, useelement
instead.LibraryElement.loadLibraryFunction2
, useloadLibraryFunction
instead.InterfaceType.constructors2
, useconstructors
instead.Element.accept2
, useaccept
instead.InstantiatedTypeAliasElement.element2
, useelement
instead.TypeProvider.boolElement2
, useboolElement
instead.TypeProvider.doubleElement2
, usedoubleElement
instead.TypeProvider.enumElement2
, useenumElement
instead.TypeProvider.futureElement2
, usefutureElement
instead.TypeProvider.futureOrElement2
, usefutureOrElement
instead.TypeProvider.intElement2
, useintElement
instead.TypeProvider.iterableElement2
, useiterableElement
instead.TypeProvider.listElement2
, uselistElement
instead.TypeProvider.mapElement2
, usemapElement
instead.TypeProvider.nullElement2
, usenullElement
instead.TypeProvider.numElement2
, usenumElement
instead.TypeProvider.objectElement2
, useobjectElement
instead.TypeProvider.recordElement2
, userecordElement
instead.TypeProvider.setElement2
, usesetElement
instead.TypeProvider.streamElement2
, usestreamElement
instead.TypeProvider.stringElement2
, usestringElement
instead.TypeProvider.symbolElement2
, usesymbolElement
instead.Annotation.element2
, useelement
instead.LibraryDirective.name2
, usename
instead.CatchClauseParameter.declaredElement2
, usedeclaredElement
instead.CompoundAssignmentExpression.readElement2
, usereadElement
instead.CompoundAssignmentExpression.writeElement2
, usewriteElement
instead.DeclaredIdentifier.declaredElement2
, usedeclaredElement
instead.DeclaredVariablePattern.declaredElement2
, usedeclaredElement
instead.EnumConstantDeclaration.constructorElement2
, useconstructorElement
instead.ExtensionOverride.element2
, useelement
instead.FunctionBody.isPotentiallyMutatedInScope2
, useisPotentiallyMutatedInScope
instead.ImportPrefixReference.element2
, useelement
instead.LibraryDirective.element2, use
element` instead.LibraryDirective.name2, use
name` instead.NamedExpression.element2, use
element` instead.NamedType.element2, use
element` instead.PatternField.element2, use
element` instead.RelationalPattern.element2, use
element` instead.VariableDeclaration.declaredElement2, use
declaredElement` instead.InterfaceType.methods2
, usemethods
instead.Fragment.name2
, usename
instead.Element.name3
, usename
instead.ConstructorElement.redirectedConstructor2
, useredirectedConstructor
instead.ConstructorElement.superConstructor2
, usesuperConstructor˙
instead.Element.children2
, usechildren
instead.Element.displayString2
, usedisplayString
instead.Element.getExtendedDisplayName2
, usegetExtendedDisplayName
instead.Element.isAccessibleIn2
, useisAccessibleIn
instead.Element.thisOrAncestorMatching2
, usethisOrAncestorMatching
instead.Element.thisOrAncestorOfType2
, usethisOrAncestorOfType
instead.EnumElement.constants2
, useconstants
instead.FieldFormalParameterElement.field2
, usefield
instead.FormalParameterElement.typeParameters2
, usetypeParameters
instead.Fragment.children3
, usechildren
instead.DartType.asInstanceOf2
, useasInstanceOf
instead.TypeSystem.instantiateInterfaceToBounds2
, useinstantiateInterfaceToBounds
instead.TypeSystem.instantiateTypeAliasToBounds2
, useinstantiateTypeAliasToBounds
instead.FormalParameterElement.appendToWithoutDelimiters
, useappendToWithoutDelimiters
instead.GetterElement.correspondingSetter2
, usecorrespondingSetter
instead.InterfaceElement.unnamedConstructor2
, useunnamedConstructor
instead.InterfaceElement.getNamedConstructor2
, usegetNamedConstructor
instead.TypeParameterizedElement.typeParameters2
, usetypeParameters
instead.FormalParameterElement.appendToWithoutDelimiters2
, useappendToWithoutDelimiters
instead.GetterElement.correspondingSetter2
, usecorrespondingSetter
instead.InterfaceElement.unnamedConstructor2
, useunnamedConstructor
instead.InterfaceElement.getNamedConstructor2
, usegetNamedConstructor
instead.LibraryElement.entryPoint2
, useentryPoint
instead.LibraryElement.exportedLibraries2
, useexportedLibraries
instead.LibraryElement.getClass2
, usegetClass
instead.LibraryElement.getEnum2
, usegetEnum
instead.LibraryElement.getMixin2
, usegetMixin
instead.LibraryExport.exportedLibrary2
, useexportedLibrary
instead.LibraryFragment.accessibleExtensions2
, useaccessibleExtensions
instead.LibraryFragment.importedLibraries2
, useimportedLibraries
instead.LibraryImport.importedLibrary2
, useimportedLibrary
instead.MixinElement.isImplementableIn2
, useisImplementableIn
instead.PatternVariableElement.join2
, usejoin
instead.PropertyAccessorElement.variable3
, usevariable
instead.PropertyInducingElement.getter2
, usegetter
instead.PropertyInducingElement.setter2
, usesetter
instead.SetterElement.correspondingGetter2
, usecorrespondingGetter
instead.SuperFormalParameterElement.superConstructorParameter2
, usesuperConstructorParameter
instead.TypeAliasElement.aliasedElement2
, usealiasedElement
instead.TypeParameterizedElement.typeParameters2
, usetypeParameters
instead.VariableElement.constantInitializer2
, useconstantInitializer
instead.TypeProvider.isNonSubtypableClass2
, useisNonSubtypableClass
instead.EnumFragment.constants2
, useconstants
instead.InterfaceElement.lookUpInheritedMethod2
, uselookUpInheritedMethod
instead.LibraryFragment.classes2
, useclasses
instead.LibraryFragment.enums2
, useenums
instead.LibraryFragment.extensionTypes2
, useextensionTypes
instead.LibraryFragment.extensions2
, useextensions
instead.LibraryFragment.functions2
, usefunctions
instead.LibraryFragment.libraryExports2
, uselibraryExports
instead.LibraryFragment.libraryImports2
, uselibraryImports
instead.LibraryFragment.mixins2
, usemixins
instead.LibraryFragment.topLevelVariables2
, usetopLevelVariables
instead.LibraryFragment.typeAliases2
, usetypeAliases
instead.PatternVariableFragment.join2
, usejoin
instead.LibraryFragment.isNonSubtypableClass2
, useisNonSubtypableClass
instead.TypeParameterizedFragment.typeParameters2
, usetypeParameters
instead.Fragment.nameOffset2
, usenameOffset
instead.DirectiveUriWithLibrary.library2
, uselibrary
instead.ElementAnnotation.element2
, useelement
instead.LibraryImport.prefix2
, useprefix
instead.MultiplyDefinedElement.conflictingElements2
, useconflictingElements
instead.ScopeLookupResult.getter2
, usegetter
instead.ScopeLookupResult.setter2
, usesetter
instead.v7.7.0
HasSinceSdkVersion
, useElement2.sinceSdkVersion
.v7.6.0
VariableElement.constantInitializer2
, useconstantInitializer
instead.VariableFragment.initializer
, useVariableElement.constantInitializer
instead.ConstantInitializer
.v7.5.9
JoinPatternVariableFragment.isConsistent
andvariables2
.Use corresponding properties of
JoinPatternVariableElement2
instead.v7.5.8
Cherry-pick https://dart-review.googlesource.com/c/sdk/+/439820
v7.5.7
LocalVariableFragment.nameOffset
, usenameOffset2
instead.v7.5.6
EnumFragment.constants2
, useEnumElement2.constants2
instead.v7.5.5
LocalVariableElement.hasInitializer
andLocalVariableFragment.hasInitializer
.This property is not useful and was not de-facto used.
v7.5.4
PromotableFragment
andPromotableElement
.These interfaces are implementation details.
v7.5.3
AugmentedExpression
andAugmentedInvocation
.This feature was removed from the specification.
v7.5.2
LibraryElement.identifier
, useuri
instead.LibraryElement2.identifier
, useuri
instead.v7.5.1
ConstantEvaluationTarget
itself, and its methods.AnalysisTarget
.api.txt
manifest.v7.5.0
ElementAnnotation
fromConstantEvaluationTarget
.ElementAnnotation
will stop implementingConstantEvaluationTarget
.ElementAnnotation.libraryFragment
, as the replacement for thedeprecations above. It provides enough information about the location.
v7.4.6
PropertyAccessorFragment.variable3
.Use
PropertyAccessorElement2.variable3
instead.PropertyInducingFragment.getter2
.Use
PropertyInducingElement2.getter2
instead.PropertyInducingFragment.setter2
.Use
PropertyInducingElement2.setter2
instead.v7.4.5
v7.4.4
LabelElement2
.v7.4.3
v7.4.2
PrefixElement2
.v7.4.1
InstanceElement.augmented
getter.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.0
flags
optional named parameter toFeatureSet.latestLanguageVersion()
.v7.2.0
ElementDirective
as superinterface forLibraryExport
,LibraryImport
,and
PartInclude
. It implementsAnnotatable
.v7.1.0
v7.0.0
DartType.element2
.DartType.isDynamic
.DartType.isVoid
.DartType.resolveToBound
.IfElement.condition
.IfStatement.condition
.AstNode.getProperty
andAstNode.setProperty
.File.createSource()
, it violates levels of abstraction.You can get
Source
instances fromAnalysisResult
s.LibraryElement.toLegacyTypeIfOptOut
.LibraryElement.toLegacyElementIfOptOut
.LibraryElement.isNonNullableByDefault
.File.changes
andFolder.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
.LibraryElement
properties.enabledPluginNames
andhint
fromAnalysisOptions
.source_io.dart
.lint/Spelunker
.source_resource.dart
.MultiplyInheritedExecutableElement
.AnalyzeFunctionBodiesPredicate
.normalParameterNames
andoptionalParameterNames
fromFunctionType
.v6.11.0
LibraryElement.exportedLibraries
.LibraryElement.importedLibraries
.v6.10.0
LibraryElement.accessibleExtensions
, useCompilationUnitElement.accessibleExtensions
instead.LibraryElement.exportedLibraries
.LibraryElement.importedLibraries
.LibraryElement.isBrowserApplication
.LibraryElement.libraryExports
,use
CompilationUnitElement.libraryExports
instead.LibraryElement.libraryImports
,use
CompilationUnitElement.libraryImports
instead.LibraryElement.prefixes
,use
CompilationUnitElement.libraryImportPrefixes
instead.LibraryElement.parts
,use
CompilationUnitElement.parts
instead.LibraryElement.scope
,use
CompilationUnitElement.scope
instead.v6.9.0
NormalFormalParameter
now implementsAnnotatedNode
.Element.enclosingElement
, useenclosingElement3
.v6.8.0
AnalysisContextCollection.dispose()
. It must be invoked at the end.ContextLocator
andContextBuilder
.Use
AnalysisContextCollection
instead.v6.7.0
File.createSource()
, it violates levels of abstraction.You can get
Source
instances fromAnalysisResult
s.AnalysisError
.v6.6.0
src/file_system/file_system.dart
from
file_system/file_system.dart
.package:analyzer/src/source/source_resource.dart
,import
package:analyzer/source/file_source.dart
instead.package:analyzer/src/source/source.dart
,import
package:analyzer/source/source.dart
instead.v6.5.2
macros: '>=0.1.2-0 <0.1.3'
.v6.5.1
macros: '>=0.1.1-0 <0.1.2'
.v6.5.0
LibraryElement.toLegacyTypeIfOptOut
.LibraryElement.toLegacyElementIfOptOut
.LibraryElement.isNonNullableByDefault
.InterfaceElement.lookUpGetter
,InterfaceElement.lookUpMethod
,and
InterfaceElement.lookUpSetter
.GeneralizingAstVisitor.visitNamedType
to invokevisitTypeAnnotation
.PropertyInducingElement get variable
inPropertyAccessorElement
,use
PropertyInducingElement? get variable2
instead.The reason for this is that when the property accessor is an augmentation
without the corresponding declaration, there is no corresponding variable.
ExtensionDeclaration.onKeyword
andextendedType
.Use
ExtensionOnClause? get onClause
instead.Extension augmentations are not allowed to have
onClause
.OnClause
, useMixinOnClause
instead.@doNotSubmit
.@mustBeConst
.constructor
,directive
,enumValue
, andtypeParameter
.AstNode.getProperty
andAstNode.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.1
v6.3.0
3.3
.ConstantEvaluator
.v6.2.0
v6.1.0
InstanceElement
, a super-interface forInterfaceElement
and
ExtensionElement
.TypeSystem.greatestLowerBound
.v6.0.0
declaredElement2
from AST.element2
from AST.name2
from AST.FunctionBody.isPotentiallyMutatedInClosure
.extensionName
,staticElement
fromExtensionOverride
.name
fromNamedType
.v5.13.0
InvalidType
is now used when types or property cannot be resolved.Previously
DynamicType
was used.v5.12.0
DartType.isDynamic
, useis DynamicType
instead.NamedType
to useimportPrefix
andname2
token.The deprecated
name
node is still visited in this version, but will stopin the next major version.
ExtensionOverride
to useimportPrefix
andname
token.The deprecated
extensionName
node is still visited in this version, butwill stop in the next major version.
AnalysisError
constructor, usetmp
constructor,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
DynamicType
was used.In the future
DynamicType
will be used only when specified explicitly,or a property is resolved against a dynamic target. The clients should
prepare by checking also for
InvalidType
in addition toDynamicType
.v5.11.1
finalKeyword
,interfaceKeyword
andsealedKeyword
ofMixinElement
. We added them preliminary whileworking on the class modifiers feature, but eventually decided to remove.
https://github.com/dart-lang/sdk/issues/521592159 for details.
v5.11.0
@experimental
from AST nodes and elements for records and patterns.IfStatement.condition
, useexpression
instead.NamedType.importPrefix
,NamedType.name2
, andNamedType.element
.Deprecated
NamedType.name
. CurrentlyIdentifier
is an expression, andan expression as a name of a type does not make sense. So, instead we model
it as a name token, the
Element
that it references, and an optional importlibrary prefix reference.
v5.10.0
DartType.isDartCoreType
.v5.9.0
FunctionBody.isPotentiallyMutatedInClosure
, not used by clients.FunctionBody.isPotentiallyMutatedInScope
and pattern assignment.v5.8.0
DartType.isVoid
, useis VoidType
instead.records
,patterns
, andclass-modifiers
features enabled by default.v5.7.1
>=2.19.0 <3.0.0
to usePathNotFoundException
fromdart:io
.v5.6.0
DartPattern.precedence
.v5.5.0
RecordPatternField
toPatternField
.RecordPatternFieldName
toPatternFieldName
.v5.4.0
v5.3.1
collection: ^1.17.0
because we useelementAtOrNull
.v5.2.0
Element.enclosingElement3
, useenclosingElement
instead.Directive.element2
, useelement
instead.CatchClause.exceptionParameter2
, useexceptionParameter
instead.CatchClause.stackTraceParameter2
, usestackTraceParameter
instead.DartType.element2
, useelement
instead.Element.isAccessibleIn2()
, useisAccessibleIn()
instead.CompilationUnitElement.enums2
, useenums
instead.CompilationUnitElement.getEnum2()
, usegetEnum()
instead.CompilationUnitElement.mixins2
, usemixins
instead.LibraryElement.parts2
, useparts
instead.ImportElement.imports2
, useimports
instead.AnalysisDriverForPackageBuild.sdkLibraryUris
.buildSdkSummary2()
, usebuildSdkSummary()
instead.v5.1.0
AstNode.name2
, usename
instead.AstNode.declaredElement2
, usedeclaredElement
instead.v5.0.0
DiagnosticMessage.message
.LibraryElement.getImportsWithPrefix()
.ParameterElement.isNotOptional
.DartType.displayName
.AnalysisDriver
.ClassOrMixinDeclaration
.Declaration.declaredElement
.Element.enclosingElement
andenclosingElement2
.ExportElement
,ImportElement
.NamedCompilationUnitMember.name
.Declaration.declaredElement
.DartType.element
.v4.7.0
addXyz
toNodeLintRegistry
.lookUpInheritedConcreteX()
toInterfaceElement
.v4.6.0
DartType.element2
, so thatInterfaceType.element2
overrides it.v4.5.0
FormalParameter.identifier
.ClassOrMixinDeclaration
, useClassDeclaration
andMixinDeclaration
directly.Declaration.declaredElement
, usedeclaredElement2
instead.This is necessary to separate
ClassElement
,EnumElement
, andMixinElement
.And, in the future, augmentations like
ClassAugmentationElement
, etc.TypeSystem.instantiateToBounds2()
, useinstantiateInterfaceToBounds()
orinstantiateTypeAliasToBounds()
instead.v4.4.0
ClassDeclaration.isAbstract
, useabstractKeyword
instead.ClassTypeAlias.isAbstract
, useabstractKeyword
instead.ClassOrMixinDeclaration.getField
, filtermembers
instead.ClassOrMixinDeclaration.getMethod
, filtermembers
instead.ClassDeclaration.getConstructor
, filtermembers
instead.Directive.element
, useelement2
instead.ClassElement.hasStaticMember
, it is not useful for clients.NamespaceDirective.uriElement
, useelement2.uri
withDirectiveUriWithLibrary
instead.UriBasedDirective.uriContent
,UriBasedDirective.uriElement
,UriBasedDirective.uriSource
.Use
Directive.element2.uri
instead.NamespaceDirective.selectedSource
, useelement2.uri
withDirectiveUriWithSource
instead.Configuration.uriSource
, useresolvedUri
instead.CatchClause.exceptionParameter
andCatchClause.stackTraceParameter
.Use
exceptionParameter2
andstackTraceParameter2
instead.FileResult.isAugmentation
andisLibrary
to complementisPart
.name2
anddeclaredElement
instead.Element.enclosingElement2
, useenclosingElement3
instead. The meaningful change is thatConstructorElement.enclosingElement3
returns nowInterfaceElement
, notClassElement
.get enums/mixin
, useget enums2/mixins2
instead.DartType.element
, check forInterfaceType
,TypeParameterType
, and then ask the element.ClassElement.isEnum
andisMixin
. Check foris EnumElement
andis MixinElement
instead.LibraryElement.getType()
usegetClass()
instead.v4.3.1
identifier
forLibraryExportElement
andLibraryImportElement
.v4.3.0
Directive.keyword
, use correspondingxyzToken
in specific directives.LibraryElement.parts
, useparts2
instead.LibraryElement.exports
, uselibraryExports
instead.LibraryElement.imports
, uselibraryImports
instead.Element.enclosingElement
, useenclosingElement2
instead.Member
is 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.0
ParameterElement.isNotOptional
, useisRequired
instead.ResourceProviderMixin.newFile2
, usenewFile
instead.ResourceProviderMixin.newAnalysisOptionsYamlFile2
, usenewAnalysisOptionsYamlFile
instead.DartType.resolveToBound
, useTypeSystem.resolveToBound
instead.LibraryElement.getImportsWithPrefix
, usePrefixElement.imports
instead.AnalysisSession.getFile()
to return updated content afterapplyPendingFileChanges
.v4.0.0
UriKind
andSource.uriKind
.LibraryElement.hasExtUri
.LibraryElement.hasLoadLibraryFunction
.ImportElement.prefixOffset
.CompilationUnitElement.types
.Source.encoding
.Source.isInSystemLibrary
.Source.modificationStamp
.stamp
inMemoryResourceProvider
.SourceFactory.restoreUri
, usepathToUri
instead.AnalysisContext.workspace
.isNonNullableByDefault
parameter inErrorReporter
is now required.Element.SORT_BY_OFFSET
, it is not used.AnalysisSession.getFile
andgetParsedUnit
to failif there are pending file changes, instead of reading. As for any other
AnalysisSession
method, awaitAnalysisContext.applyPendingFileChanges()
.Token.copy()
andcopyComments()
.CommentToken.remove()
.astFactory
andAstFactory
.AnalysisOptions.signature
andsignaturesEqual
.buildSdkSummary()
.v3.4.1
Compare Source
AnalysisSession
.v3.4.0
Compare Source
Resource.parent2
, useparent
instead.astFactory
, clients should not create AST nodes manually.CompilationUnit.lineInfo
to be non-nullable.CompilationUnitElement.lineInfo
to be non-nullable.ResourceProviderMixin.newFile
, usenewFile2
instead.ResourceProviderMixin.newAnalysisOptionsYamlFile
.AnalysisContext.changeFile
andAnalysisContext.applyPendingFileChanges
.buildSdkSummary
, use asynchronousbuildSdkSummary2
instead.v3.3.1
Compare Source
v3.3.0
Compare Source
getField
toExtensionElement
.isGenerative
toConstructorElement
.isDartCoreEnum
toClassElement
andDartType
.superclass2
,mixinTypes2
, etc. Usesuperclass
,mixinTypes
, etc.enhanced-enums
language feature.v3.2.0
Compare Source
changes
getter inFile
andFolder
, usewatch()
instead.v3.1.0
Compare Source
package:dart_style
.MockSdk
class.AnalysisDriver
constructor.2.17
.v3.0.0
DartType.aliasElement/aliasArguments
.FeatureSet
.UnitElementResult.signature
- unused by clients.AnalysisError.withNamedArguments
.ErrorReporter.reportErrorMessage
.ResourceProvider.getModificationTimes()
.MemoryResourceProvider.newDummyLink()
.MemoryResourceProvider.updateFile()
.Resource.parent
.ResultState
andAnalysisResult.state
.summary_file_builder
library.message
andcorrection
fromErrorCode
.lookUp
methods fromInterfaceType
.InterfaceType.getSmartLeastUpperBound
.path
anduri
fromAnalysisResult
.AnalysisSession
.TypeName
and corresponding methods.TypeProvider
.v2.8.0
getXyz
methods inAnalysisDriver
.double
in mock SDK.path
anduri
fromAnalysisResult
.UriResolver.restoreAbsolute
, usepathToUri
instead.SourceFactory.restoreAbsolute
, usepathToUri
instead.UriKind
andSource.uriKind
.Source.modificationStamp
.Source.isInSystemLibrary
, useuri.isScheme('dart')
instead.v2.7.0
Compare Source
ConstructorElement.displayName
to eitherClass
orClass.constructor
.InterfaceType.getSmartLeastUpperBound
, useTypeSystem.leastUpperBound
instead.MockSdk
, usecreateMockSdk
andFolderBasedDartSdk
instead.v2.6.0
Compare Source
AnalysisResult.state
, check for specific valid or invalid subtypes.ResultState
.LibraryElement.hasExtUri
, FFI should be used instead.v2.5.0
Compare Source
MockSdk
to include more declarations.v2.4.0
Compare Source
ResourceProvider.getModificationTimes()
.MemoryResourceProvider.newDummyLink()
.MemoryResourceProvider.updateFile()
.TypeName
, useNamedType
instead.AstVisitor.visitNamedType()
instead ofvisitTypeName()
.ClassTypeAlias.superclass
, usesuperclass2
instead.ConstructorName.type
, usetype2
instead.ExtendsClause.superclass
, usesuperclass2
instead.ImplementsClause.interfaces
, useinterfaces2
instead.OnClause.superclassConstraints
, usesuperclassConstraints2
instead.TypeLiteral.typeName
, usetype
instead.WithClause.mixinTypes
, usemixinTypes2
instead.AstFactory.typeName()
, usenamedType()
instead.v2.3.0
Compare Source
constructor-tearoffs
feature by default in2.15
.v2.2.0
Compare Source
v2.1.0
Compare Source
AnalysisResult.path
to be non-nullable.ParsedLibraryResult.units
to be non-nullable.ResolvedLibraryResult.element
to be non-nullable.ResolvedLibraryResult.units
to be non-nullable.ResolvedUnitResult.content
to be non-nullable.ResolvedUnitResult.unit
to be non-nullable.AnalysisSession.getXyz2()
intogetXyz()
.AnalysisDriver.results
toStream<Object>
.It used to always produce
ResolvedUnitResult
s, but sometimes itscontent
andunit
werenull
, when the result actually had only errors.Now it produces either
ResolvedUnitResult
, orErrorsResult
, orsome other results that might be added in the future.
DartType.alias
with information about instantiated type alias.The type alias element and arguments are present or absent together.
DartType.aliasElement
andDartType.aliasArguments
.2.15
.v2.0.0
Compare Source
Scope.lookup2()
.FunctionTypeAliasElement
.LineInfo.getLocation()
to returnCharacterLocation
.LineInfo_Location
.AnalysisSession
.DartObject.type
fromParameterizedType?
toDartType?
.FunctionType
to implementDartType
, notParameterizedType
.FunctionType.element
andFunctionType.typeArguments
.DartObject.type
fromParameterizedType?
toDartType?
.FunctionType
to implementDartType
, notParameterizedType
.FunctionType.element
andFunctionType.typeArguments
.StringInterpolation.firstString
andlastString
, to expressexplicitly that there are always (possibly empty) strings as the first
and the last elements of an interpolation.
ImportElement.prefixOffset
, useprefix.nameOffset
instead.CompilationUnitElement.types
, useclasses
instead.Element.nonSynthetic
, use it to get the element that caused creationof this element, e.g. the field for a synthetic getter.
FieldElement.isFinal
istrue
only when the field is not synthetic.-1
asnameOffset
.defaultValueCode
isnull
for field formal parameters.LibraryElement.name
so that it is non-nullable.v1.7.2
Compare Source
v1.7.1
Compare Source
v1.7.0
Compare Source
meta: ^1.4.0
.v1.6.0
Compare Source
AnalysisDriver
default constructor. Addedtmp1
. The goalis to allow deprecating and removing unused parameters.
tearoffs" feature:
ConstructorReference
,FunctionReference
, andTypeLiteral
.v1.5.0
Compare 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.0
Compare Source
TypeProvider.nonSubtypableClasses
.Use
TypeProvider.isNonSubtypableClass
instead.sdkPath
toAnalysisContextCollection
constructor.nonfunction-type-aliases
is enabled by default in thelanguage version
2.13
.v1.3.0
Compare Source
Expression.inConstantContext
to API.null
.CompilationUnitElement.mixins
beforetypes
.v1.2.0
Compare Source
parseString()
instead.AnalysisSession.getErrors()
does not returnnull
, check itsstate
.aliasElement
andaliasArguments
for aliases ofInterfaceType
s andTypeParameterType
s.v1.1.0
TypeProvider.futureType2()
,iterableType2()
, etc.Use corresponding
TypeProvider.futureType()
,iterableType()
, etc.Resource.parent2
and deprecatedResource.parent
.Folder.isRoot
.FolderExtension
withwithAncestors
.ContextRoot.workspace
, deprecatedAnalysisContext.workspace
.ElementVisitor.visitFunctionTypeAliasElement()
.Override
ElementVisitor.visitTypeAliasElement()
instead.FunctionTypeAliasElement
. UseTypeAliasElement
instead.v1.0.0
v0.41.1
PackageBuildWorkspace
that supportspackage:build
to stopat the first directory with
pubspec.yaml
, and don't try to go upand find another one with both
pubspec.yaml
and.dart_tool/build
.ErrorCode
class. It will be used tomigrate existing
ErrorCode
subclasses, and then deprecated and removed.v0.41.0
Scope.lookup({id, setter})
withlookup(id)
.Scope.lookup2(id)
, uselookup()
instead.Member.baseElement
.package:analyzer/analyzer.dart
library.ElementAnnotation.constantValue
.VariableElement.constantValue
.VariableElement.initializer
.auxiliaryElements
.FunctionType.element
for types created from atypedef
is now
FunctionTypeAliasElement
, not its function element.GenericTypeAliasElement
.PhysicalResourceProvider.NORMALIZE_EOL_ALWAYS
.PhysicalResourceProvider
constructor to no longer take arequired positional parameter (removed the existing
fileReadMode
positionalparameter).
v0.40.6
Instead of the latest known language version, the language version of the
SDK (against which analysis is done, not necessary the same as used to run
the analyzer) is used.
v0.40.5
GenericTypeAliasElement
. UseFunctionTypeAliasElement
.AnalysisDriver
.Specifically,
parseFileSync
will not read any referenced files.identifiers in metadata (still set in arguments).
v0.40.4
IndexExpression.auxiliaryElements
andSimpleIdentifier.auxiliaryElements
. UseCompoundAssignmentExpression
.getReadType
, useCompoundAssignmentExpression
.v0.40.3
2.11
.43462, 43439, 43162, 43397, 43200.
v0.40.2
meta: ^1.2.3
.v0.40.1
LocalVariableElement.hasInitializer
,PropertyInducingElement.hasInitializer
,ParameterElement.hasDefaultValue
.ElementImpl.toString()
usesgetDisplayString(withNullability: true)
.ElementAnnotation.constantValue
, it does not guarantee thatthe value has been computed. Use
computeConstantValue()
instead.CompoundAssignmentExpression
with read/write element/type getters.This interface is implemented by
AssignmentExpression
,PostfixExpression
and
PrefixExpression
. Use it instead ofstaticElement
andstaticType
of the left-hand side expressions (target expressions in case of postfix
or prefix expressions with increment operator).
43032, 43073.
v0.40.0
LibraryElement.featureSet
.EmbedderSdk
and related classes.FunctionType
returned fromExecutableElement.type
returnnull
as its
element
. UseExecutableElement
s directly if necessary.FunctionTypeAliasElement
does not implementFunctionTypedElement
anymore, implements
TypeParameterizedElement
instead.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.