Closed
Description
As part of moving LintRule and it's dependencies into public API (#50986), I see that we expose WorkspacePackage
, and intentionally. Lint rules use it to figure out if a file is in public API, or if it's in the lib/
directory, etc.
So I'd like to move WorkspacePackage
into public API. Luckily, we can extract a very small subset of the class, into a new class WorkspacePackage
, and rename the private impl code WorkspacePackageImpl
.
Here's a draft CL: https://dart-review.googlesource.com/c/sdk/+/428564
Here are the new bits in api.txt
, quite minimal:
package:analyzer/workspace/workspace.dart:
WorkspacePackage (class extends Object):
new (constructor: WorkspacePackage Function())
canHavePublicApi (getter: bool)
root (getter: String)
contains (method: bool Function(Source))
isInTestDirectory (method: bool Function(File))