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

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

Issue 159003004: Ignore files generated by the Editor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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/test/build/ignores_existing_compiled_js_files_test.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/build_environment.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart b/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart
index 9e1467b071a00811e382b5d860bd081a349ee377..af2eae8c906043bad774c0258d8914ed871e643a 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart
@@ -221,15 +221,18 @@ class BuildEnvironment {
var parts = path.split(event.path);
if (parts.contains("packages") || parts.contains("assets")) return;
- // Skip ".js" files that were (most likely) compiled from nearby
- // ".dart" files. These are created by the Editor's "Run as
- // JavaScript" command and are written directly into the package's
- // directory. When pub's dart2js transformer then tries to create the
- // same file name, we get a build error. To avoid that, just don't
- // consider that file to be a source.
- // TODO(rnystrom): Remove this when the Editor no longer generates
- // .js files. See #15859.
+ // Skip files that were (most likely) compiled from nearby ".dart"
+ // files. These are created by the Editor's "Run as JavaScript"
+ // command and are written directly into the package's directory.
+ // When pub's dart2js transformer then tries to create the same file
+ // name, we get a build error. To avoid that, just don't consider
+ // that file to be a source.
+ // TODO(rnystrom): Remove these when the Editor no longer generates
+ // .js files and users have had enough time that they no longer have
+ // these files laying around. See #15859.
if (event.path.endsWith(".dart.js")) return;
+ if (event.path.endsWith(".dart.js.map")) return;
+ if (event.path.endsWith(".dart.precompiled.js")) return;
var id = new AssetId(package.name,
path.relative(event.path, from: package.dir));
@@ -264,15 +267,18 @@ class BuildEnvironment {
// Skip directories.
if (!fileExists(entry)) continue;
- // Skip ".js" files that were (most likely) compiled from nearby ".dart"
- // files. These are created by the Editor's "Run as JavaScript" command
- // and are written directly into the package's directory. When pub's
- // dart2js transformer then tries to create the same file name, we get
- // a build error. To avoid that, just don't consider that file to be a
- // source.
- // TODO(rnystrom): Remove this when the Editor no longer generates .js
- // files. See #15859.
+ // Skip files that were (most likely) compiled from nearby ".dart"
+ // files. These are created by the Editor's "Run as JavaScript"
+ // command and are written directly into the package's directory.
+ // When pub's dart2js transformer then tries to create the same file
+ // name, we get a build error. To avoid that, just don't consider
+ // that file to be a source.
+ // TODO(rnystrom): Remove these when the Editor no longer generates
+ // .js files and users have had enough time that they no longer have
+ // these files laying around. See #15859.
if (entry.endsWith(".dart.js")) continue;
+ if (entry.endsWith(".dart.js.map")) continue;
+ if (entry.endsWith(".dart.precompiled.js")) continue;
var id = new AssetId(package.name,
path.relative(entry, from: package.dir));
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/build/ignores_existing_compiled_js_files_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698