@@ -380,17 +380,6 @@ class ContextLocatorImpl implements ContextLocator {
380
380
381
381
var rootPath = folder.path;
382
382
383
- // TODO(scheglov) Do we need this?
384
- if (_hasPackageFileInPath (rootPath)) {
385
- // A Bazel or Gn workspace that includes a '.packages' file is treated
386
- // like a normal (non-Bazel/Gn) directory. But may still use
387
- // package:build or Pub.
388
- return PackageBuildWorkspace .find (
389
- resourceProvider, packageMap, rootPath) ??
390
- PubWorkspace .find (resourceProvider, packageMap, rootPath) ??
391
- BasicWorkspace .find (resourceProvider, packageMap, rootPath);
392
- }
393
-
394
383
Workspace ? workspace;
395
384
workspace = BazelWorkspace .find (resourceProvider, rootPath,
396
385
lookForBuildFileSubstitutes: false );
@@ -522,15 +511,6 @@ class ContextLocatorImpl implements ContextLocator {
522
511
return null ;
523
512
}
524
513
525
- /// Return `true` if either the directory at [rootPath] or a parent of that
526
- /// directory contains a `.packages` file.
527
- bool _hasPackageFileInPath (String rootPath) {
528
- var folder = resourceProvider.getFolder (rootPath);
529
- return folder.withAncestors.any ((current) {
530
- return current.getChildAssumingFile ('.packages' ).exists;
531
- });
532
- }
533
-
534
514
/// Add to the given lists of [folders] and [files] all of the resources in
535
515
/// the given list of [paths] that exist and are not contained within one of
536
516
/// the folders.
0 commit comments