Index: pkg/polymer/lib/src/build/script_compactor.dart |
diff --git a/pkg/polymer/lib/src/build/script_compactor.dart b/pkg/polymer/lib/src/build/script_compactor.dart |
index b633360cb27610da7432724910bb1394b32d6a52..d11b6167149d8391c0bae83eb8ed08976b279ead 100644 |
--- a/pkg/polymer/lib/src/build/script_compactor.dart |
+++ b/pkg/polymer/lib/src/build/script_compactor.dart |
@@ -45,7 +45,47 @@ class ScriptCompactor extends Transformer { |
final TransformOptions options; |
ScriptCompactor(this.options, {String sdkDir}) |
- : resolvers = new Resolvers(sdkDir != null ? sdkDir : dartSdkDirectory); |
+ // TODO(sigmund): consider restoring here a resolver that uses the real |
+ // SDK once the analyzer is lazy and only an resolves what it needs: |
+ //: resolvers = new Resolvers(sdkDir != null ? sdkDir : dartSdkDirectory); |
+ : resolvers = new Resolvers.fromMock({ |
+ // The list of types below is derived from: |
+ // * types we use via our smoke queries, including HtmlElement and |
+ // types from `_typeHandlers` (deserialize.dart) |
+ // * types that are used internally by the resolver (see |
+ // _initializeFrom in resolver.dart). |
+ 'dart:core': ''' |
+ library dart.core; |
+ class Object {} |
+ class Function {} |
+ class StackTrace {} |
+ class Symbol {} |
+ class Type {} |
+ |
+ class String extends Object {} |
+ class bool extends Object {} |
+ class num extends Object {} |
+ class int extends num {} |
+ class double extends num {} |
+ class DateTime extends Object {} |
+ class Null extends Object {} |
+ |
+ class Deprecated extends Object { |
+ final String expires; |
+ const Deprecated(this.expires); |
+ } |
+ const Object deprecated = const Deprecated("next release"); |
+ |
+ class List<V> extends Object {} |
+ class Map<K, V> extends Object {} |
+ ''', |
+ 'dart:html': ''' |
+ library dart.html; |
+ class HtmlElement {} |
+ ''', |
+ }); |
+ |
+ |
/// Only run on entry point .html files. |
// TODO(nweiz): This should just take an AssetId when barback <0.13.0 support |