dart-archive / barback

An asset build system for Dart.
https://pub.dartlang.org/packages/barback
BSD 3-Clause "New" or "Revised" License
10 stars 9 forks source link

Barback doesn't handle pass throughs from declared transformers #52

Closed DartBot closed 9 years ago

DartBot commented 9 years ago

Issue by munificent Originally opened as dart-lang/sdk#19408


sdk/lib/_internal/pub/test/run/displays_transformer_logs_test, there is a little lazy transformer containing:

  void apply(Transform transform) {     transform.logger.info('\${transform.primaryInput.id}.');     transform.logger.warning('\${transform.primaryInput.id}.');   }

  void declareOutputs(DeclaringTransform transform) {     transform.declareOutput(transform.primaryId);   }

The .declareOutput() call should not be necessary since the primary input should implicitly pass through. However, if it's removed, the transformer isn't run even when the passed-through asset is requested.

DartBot commented 9 years ago

Comment by nex3


Thinking this through more thoroughly, I don't think we actually want this behavior. If a lazy transformer doesn't overwrite an output, it shouldn't run when that output is requested.


Added AsDesigned label.