Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: sdk/lib/_internal/pub/lib/src/entrypoint.dart

Issue 14762003: Put "packages" directories in "benchmark". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Show validation warning on "benchmarks". Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/validator/directory.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/entrypoint.dart
diff --git a/sdk/lib/_internal/pub/lib/src/entrypoint.dart b/sdk/lib/_internal/pub/lib/src/entrypoint.dart
index e8fa70e49fab60cb311cb120a74d2bace67072cb..9341c9b39a70ed467225c973687f2243fe9f208e 100644
--- a/sdk/lib/_internal/pub/lib/src/entrypoint.dart
+++ b/sdk/lib/_internal/pub/lib/src/entrypoint.dart
@@ -171,18 +171,16 @@ class Entrypoint {
isSelfLink: true, relative: true);
}
- /// If `bin/`, `test/`, or `example/` directories exist, symlink `packages/`
- /// into them so that their entrypoints can be run. Do the same for any
- /// subdirectories of `test/` and `example/`.
+ /// Add "packages" directories to the whitelist of directories that may
+ /// contain Dart entrypoints.
void _linkSecondaryPackageDirs() {
+ // Only the main "bin" directory gets a "packages" directory, not its
+ // subdirectories.
var binDir = path.join(root.dir, 'bin');
- var exampleDir = path.join(root.dir, 'example');
- var testDir = path.join(root.dir, 'test');
- var toolDir = path.join(root.dir, 'tool');
- var webDir = path.join(root.dir, 'web');
-
if (dirExists(binDir)) _linkSecondaryPackageDir(binDir);
- for (var dir in ['example', 'test', 'tool', 'web']) {
+
+ // The others get "packages" directories in subdirectories too.
+ for (var dir in ['benchmark', 'example', 'test', 'tool', 'web']) {
_linkSecondaryPackageDirsRecursively(path.join(root.dir, dir));
}
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/validator/directory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698