Skip to content

Remove ContextBuilder and its tests #54046

Open
@scheglov

Description

@scheglov

Instead we want to create AnalysisContextCollection and verify the created analysis contexts, with files, environment, etc.
As you can imagine, my preference is to dump all this state as text, to get comprehensive view easily.
Kind of like this.

test_newFile_noDirectives() async {
final a = newFile('$testPackageLibPath/a.dart', '');
fileStateFor(a);
assertDriverStateString(testFile, r'''
files
/home/test/lib/a.dart
uri: package:test/a.dart
current
id: file_0
kind: library_0
libraryImports
library_1 dart:core synthetic
cycle_0
dependencies: dart:core
libraries: library_0
apiSignature_0
unlinkedKey: k00
libraryCycles
elementFactory
''');
}

ContextBuilder should not be used by clients, which should be migrated to AnalysisContextCollection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onanalyzer-technical-debtarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.type-code-healthInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainable

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions