Skip to content

Commit 3104f34

Browse files
committed
fe41169 feat(dart/transform): DirectiveProcessor: do not process generated files
1 parent 5886885 commit 3104f34

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

BUILD_INFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Fri Jan 22 00:08:42 UTC 2016
2-
47154d50ac55986b08e0b028278408550619f886
1+
Fri Jan 22 00:11:17 UTC 2016
2+
fe4116923d11950915c09c0f61f3615ea3d4776a

lib/src/transform/common/names.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ const ALL_EXTENSIONS = const [
3939
bool isGenerated(String uri) {
4040
return const [
4141
DEPS_EXTENSION,
42+
META_EXTENSION,
4243
NON_SHIMMED_STYLESHEET_EXTENSION,
4344
SHIMMED_STYLESHEET_EXTENSION,
45+
SUMMARY_META_EXTENSION,
4446
TEMPLATE_EXTENSION,
4547
].any((ext) => uri.endsWith(ext));
4648
}

lib/src/transform/directive_processor/transformer.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class DirectiveProcessor extends Transformer implements LazyTransformer {
2828
DirectiveProcessor(this.options);
2929

3030
@override
31-
bool isPrimary(AssetId id) => id.extension.endsWith('dart');
31+
bool isPrimary(AssetId id) =>
32+
id.extension.endsWith('dart') && !isGenerated(id.path);
3233

3334
@override
3435
declareOutputs(DeclaringTransform transform) {

lib/src/transform/template_compiler/compile_data_creator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class _CompileDataCreator {
130130
} else if (depNgMeta.aliases.containsKey(dep.name)) {
131131
resolvedMetadata.addAll(depNgMeta.flatten(dep.name));
132132
} else {
133-
log.error(
133+
log.warning(
134134
'Could not find Directive/Pipe entry for $dep. '
135135
'Please be aware that Dart transformers have limited support for '
136136
'reusable, pre-defined lists of Directives/Pipes (aka '

0 commit comments

Comments
 (0)