Open srawlins opened 11 months ago
This is really exciting Sam! If you could use any help trying out prototypes I'd volunteer some time!
@srawlins Would you mind creating go links for your design docs on https://github.com/flutter/website/blob/main/firebase.json? Then you can add them to the top of your docs making them a bit easier to share and discuss publicly.
Community members often follow new go links on flutter.dev as well.
I'm not good about referencing this issue in my CLs, as all the work is sort of just preparation and grooming the code. So I'll write down some of the under-the-hood changes I've been making. They are largely to support two areas: lint rule APIs and correction producer (mostly quick fix) APIs:
lint rule APIs:
LinterContext
:
LinterContextImpl
: remove strictCasts
field (344200).LintDriver
and DartLinter
as "only used for linter tools and tests" (334645).CamelCaseString
and SourceLinter
(334645).DartLinter.lintPubspecSource
as @visibleForTesting
(334645).LinterOptions
: mark enabledLints
and analysisOptions
final, and remove
resourceProvider
(334645).lintFiles
, classes ErrorWatchingSink
and FileGlobFilter
to linter's tool/
directory (334645).NodeLintRegistry
: remove deprecated addOnClause
(366404).NodeLintRuleWithContext
(366504), Linter
, getVisitor
, linterVersion
(366840), LinterAnalysis.linterUnit
, LinterContextUnit2
(366405).LibraryAnalyzer._computeLints
(366222).LinterContextUnit.errorReporter
(366405).correction producer APIs:
_AbstractCorrectionProducer
:
CorrectionProducer
:
MultiCorrectionProducer
: remove typeProvider
, typeSystem
(367363).ResolvedCorrectionProducer
: remove coreTypeBool
(367363).CorrectionUtils
:
patternOfBoolCondition
(347781).findPossibleLocalVariableConflicts
(358641).getTypeSource
, targetClassElement
, and
targetExecutableElement
(358663).prepareNewStatementLocation
(360080).prepareNewFieldLocation
and
prepareNewGetterLocation
to DartFileEditBuilder, as
addFieldInsertion
and addGetterInsertion
(360302).addMethodInsert
and addCaseClauseAtEndInsert
to DartEditBuilder (360980).getDefaultValueCode
(361132).DartFileEditBuilder
(362063).prepareNewClassMemberLocation
(362303).addLibraryImports
(363402).indentLeft
, indentRight
(363404).selectionIncludesNonWhitespaceOutsideNode
(363501).DartFileEditBuilder
:
addConstructorInsertion
, a replacement for both CorrectionUtils.prepareEnumNewConstructorLocation
and
CorrectionUtils.prepareNewConstructorLocation
(361624).add___Insertion
APIs to insert___
(362001).insertIntoUnitMember
(362183).writeOverride
called setSelection
which controls whether selection should be set (362183).AssistProcessor.generators
, multiGenerators
, .assistContext
, .assists
(364420).FixProcessor
:
FixProcessor.fixContext
(364420).hasFix
top-level function(345347), classes TransformOverride
(347641), ExpressionCasePattern
(347781), CorrectionUtils_InsertDesc
(347780), CancelCorrectionException
(348083), Baseprocessor
(364360).DartFixContext
and DartFixContextImpl
and change constructor to use all named parameters (358382).Flutter
. Most methods are refactored as extension methods. Some unused ones are deleted.
Some are inlined into their call sites (362300).TransformOverrideSet
(340280).I'll update this comment as I make more preparatory changes.
Tasks needed to deliver a new analyzer plugin system: