Chromium Code Reviews

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart

Issue 24886002: Support dart2js in pub serve. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback/server.dart ('k') | sdk/lib/_internal/pub/lib/src/dart.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/barback/watch_sources.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart b/sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart
index 89f474ce3656768160f153a71e78161eaf534ea9..bc1c7ec8c582e6ecc9d8d17f67d9c798e35a0a4d 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/watch_sources.dart
@@ -26,6 +26,11 @@ void watchSources(PackageGraph graph, Barback barback) {
// TODO(nweiz): close these watchers when [barback] is closed.
var watcher = new DirectoryWatcher(subdirectory);
watcher.events.listen((event) {
+ // Don't watch files symlinked into these directories.
+ // TODO(rnystrom): If pub gets rid of symlinks, remove this.
+ var parts = path.split(event.path);
+ if (parts.contains("packages") || parts.contains("assets")) return;
+
var id = new AssetId(package.name,
path.relative(event.path, from: package.dir));
if (event.type == ChangeType.REMOVE) {
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback/server.dart ('k') | sdk/lib/_internal/pub/lib/src/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine