Closed DartBot closed 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.
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.