Files
sdk/pkg/analyzer_testing/api.txt
T
Konstantin Shcheglov e20704c3b0 CQ. Move PackageConfigFileBuilder to analyzer_testing.
Move PackageConfigFileBuilder into the analyzer_testing public API and
deprecate the copy exposed from package:analyzer. The builder is only
used by test infrastructure, so keeping it in analyzer_testing makes the
ownership clearer and avoids exposing test-only utilities from analyzer.

Update the builder API to accept a rootFolder instead of a rootPath.
This lets callers pass the resource-provider folder directly, so the
generated rootUri is derived from the same file-system abstraction that
created the test files. This avoids accidentally passing POSIX paths
where resource provider paths are required, such as on Windows.

Update existing test utilities and callers to import the new library and
pass Folder objects. Remove the production analysis server dependency on
the builder by emitting the temporary plugin package config JSON
directly.

Change-Id: I46b14710626e0d6d5884afcdc5a05b23077acfc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499081
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-04-29 13:18:35 -07:00

111 lines
5.9 KiB
Plaintext

package:analyzer_testing/analysis_rule/analysis_rule.dart:
contextMessage (function: ExpectedContextMessage Function(File, int, int, {deprecated String? text, List<Pattern> textContains}))
error (function: ExpectedDiagnostic Function(DiagnosticCode, int, int, {List<ExpectedContextMessage>? contextMessages, Pattern? correctionContains, deprecated Pattern? messageContains, List<Pattern> messageContainsAll}))
AnalysisRuleTest (class extends PubPackageResolutionTest, abstract):
new (constructor: AnalysisRuleTest Function())
analysisRule (getter: String, deprecated)
rule (getter: AbstractAnalysisRule)
rule= (setter: AbstractAnalysisRule)
assertNoPubspecDiagnostics (method: Future<void> Function(String))
assertPubspecDiagnostics (method: Future<void> Function(String, List<ExpectedDiagnostic>))
correctionMessage (method: String Function(List<Diagnostic>))
lint (method: ExpectedDiagnostic Function(int, int, {List<ExpectedContextMessage>? contextMessages, Pattern? correctionContains, deprecated Pattern? messageContains, List<Pattern> messageContainsAll, String? name}))
setUp (method: void Function())
unexpectedMessage (method: String Function(List<Diagnostic>))
PackageBuilder (class extends Object):
addFile (method: void Function(String, String))
package:analyzer_testing/experiments/experiments.dart:
experimentsForTests (static getter: List<String>)
experimentsForTests= (static setter: List<String>)
package:analyzer_testing/mock_packages/mock_packages.dart:
BlazeMockPackages (class extends Object):
instance (static getter: BlazeMockPackages)
addFlutter (method: void Function(ResourceProvider))
addMeta (method: void Function(ResourceProvider))
MockPackagesMixin (mixin on Object):
packagesRootPath (getter: String)
pathContext (getter: Context)
resourceProvider (getter: ResourceProvider)
addFfi (method: Folder Function())
addFixnum (method: Folder Function())
addFlutter (method: Folder Function())
addMeta (method: Folder Function())
addSkyEngine (method: Folder Function({required String sdkPath}))
addTestReflectiveLoader (method: Folder Function())
addVectorMath (method: Folder Function())
package:analyzer_testing/package_config_file_builder.dart:
PackageConfigFileBuilder (class extends Object):
new (constructor: PackageConfigFileBuilder Function())
add (method: void Function({String? languageVersion, required String name, String packageUriStr, required Folder rootFolder}))
copy (method: PackageConfigFileBuilder Function())
toContent (method: String Function())
package:analyzer_testing/package_root.dart:
packageRoot (static getter: String)
package:analyzer_testing/resource_provider_mixin.dart:
ResourceProviderMixin (mixin on Object):
pathContext (getter: Context)
resourceProvider (getter: ResourceProvider)
convertPath (method: String Function(String))
deleteFile (method: void Function(String))
deleteFolder (method: void Function(String))
fromUri (method: String Function(Uri))
getFile (method: File Function(String))
getFolder (method: Folder Function(String))
join (method: String Function(String, [String?, String?, String?, String?, String?, String?, String?]))
modifyFile2 (method: void Function(File, String))
newAnalysisOptionsYamlFile (method: File Function(String, String))
newBazelBuildFile (method: File Function(String, String))
newBuildGnFile (method: File Function(String, String))
newFile (method: File Function(String, String))
newFolder (method: Folder Function(String))
newLink (method: Link Function(String, String))
newPackageConfigJsonFile (method: File Function(String, String))
newPackageConfigJsonFileFromBuilder (method: File Function(String, PackageConfigFileBuilder))
newPubspecYamlFile (method: File Function(String, String))
newSinglePackageConfigJsonFile (method: void Function({required String name, required String packagePath}))
toUri (method: Uri Function(String))
toUriStr (method: String Function(String))
package:analyzer_testing/src/analysis_rule/pub_package_resolution.dart:
ExpectedContextMessage (non-public)
ExpectedDiagnostic (non-public)
PubPackageResolutionTest (non-public)
package:analyzer_testing/utilities/extensions/diagnostic_code.dart:
DiagnosticCodeExtension (extension on DiagnosticCode):
constantName (getter: String)
package:analyzer_testing/utilities/extensions/resource_provider.dart:
ResourceProviderExtension (extension on ResourceProvider):
convertPath (method: String Function(String))
package:analyzer_testing/utilities/extensions/string.dart:
StringExtension (extension on String):
isCamelCase (getter: bool)
isPascalCase (getter: bool)
toCamelCase (method: String Function())
toPascalCase (method: String Function())
toSnakeCase (method: String Function())
package:analyzer_testing/utilities/utilities.dart:
analysisOptionsContent (function: String Function({Map<String, Object?> errors, List<String> experiments, List<String> includes, List<String> legacyPlugins, bool propagateLinterExceptions, List<String> rules, bool strictCasts, bool strictInference, bool strictRawTypes, List<String> unignorableNames}))
pubspecYamlContent (function: String Function({List<String> dependencies, String? name, String? sdkVersion}))
dart:async:
Future (referenced)
dart:core:
List (referenced)
Map (referenced)
Object (referenced)
Pattern (referenced)
String (referenced)
Uri (referenced)
bool (referenced)
int (referenced)
package:_fe_analyzer_shared/src/base/errors.dart:
Diagnostic (referenced)
DiagnosticCode (referenced)
package:analyzer/file_system/file_system.dart:
File (referenced)
Folder (referenced)
Link (referenced)
ResourceProvider (referenced)
package:analyzer/src/analysis_rule/analysis_rule.dart:
AbstractAnalysisRule (referenced)
package:path/src/context.dart:
Context (referenced)