Fix windows issues w/ the packages dir handling removal.

Change-Id: I78cf4b8787da7449f8a7a2840b9dd91e2342d5ec
Reviewed-on: https://dart-review.googlesource.com/49830
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This commit is contained in:
Devon Carew 2018-04-06 16:24:52 +00:00 committed by commit-bot@chromium.org
parent 9bb085a1c6
commit 6ce79da9a1
3 changed files with 15 additions and 13 deletions

View file

@ -2,6 +2,17 @@
(Add new changes here, and they will be copied to the
change section for the next dev version)
### Tool Changes
#### Analyzer
* The command line analyzer (dartanalyzer) and the analysis server no longer
treat directories named `packages` specially. Previously they had ignored
these directories - and their contents - from the point of view of analysis. Now
they'll be treated just as regular directories. This special-casing of
`packages` directories was to support using symlinks for package: resolution;
that functionality is now handled by `.packages` files.
## 2.0.0-dev.45.0
### Core library changes
@ -19,15 +30,6 @@
[pub#1856]: https://github.com/dart-lang/pub/issues/1856
#### Analyzer
* The command line analyzer (dartanalyzer) and the analysis server no longer
treat directories named `packages` specially. Previously they had ignored
these directories - and their contents - from the point of view of analysis. Now
they'll be treated just as regular directories. This special-casing of
`packages` directories was to support using symlinks for package: resolution;
that functionality is now handled by `.packages` files.
## 2.0.0-dev.44.0

View file

@ -226,9 +226,9 @@ test_pack:lib/''');
resourceProvider.newFile(pubspecPath, 'pubspec');
// create a file in the "packages" folder
String filePath1 = path.posix.join(projPath, 'packages', 'file1.dart');
resourceProvider.newFile(filePath1, 'contents');
File file1 = resourceProvider.newFile(filePath1, 'contents');
manager.setRoots(<String>[projPath], <String>[], <String, String>{});
expect(callbacks.currentFilePaths, unorderedEquals([filePath1]));
expect(callbacks.currentFilePaths, unorderedEquals([file1.path]));
String filePath2 = path.posix.join(projPath, 'packages', 'file2.dart');
resourceProvider.newFile(filePath2, 'contents');
return pumpEventQueue().then((_) {

View file

@ -436,7 +436,7 @@ class ContextLocatorImplTest extends Object with ResourceProviderMixin {
Folder outerRootFolder = newFolder('/test/outer');
File outerOptionsFile = newOptionsFile('/test/outer');
File outerPackagesFile = newPackagesFile('/test/outer');
newOptionsFile('/test/outer/packages/inner');
File innerOptionsFile = newOptionsFile('/test/outer/packages/inner');
List<ContextRoot> roots =
contextLocator.locateRoots(includedPaths: [outerRootFolder.path]);
@ -445,7 +445,7 @@ class ContextLocatorImplTest extends Object with ResourceProviderMixin {
ContextRoot outerRoot = findRoot(roots, outerRootFolder);
expect(outerRoot.includedPaths, unorderedEquals([outerRootFolder.path]));
expect(outerRoot.excludedPaths,
unorderedEquals(['/test/outer/packages/inner']));
unorderedEquals([innerOptionsFile.parent.path]));
expect(outerRoot.optionsFile, outerOptionsFile);
expect(outerRoot.packagesFile, outerPackagesFile);
}