Consider configuring the builder to run on test/ directory only by default #502
Labels
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
More details in dart-lang/build#3238, but currently the mockito builder in this package specifies
.dart
as the build extension for its inputs and doesn't configure thegenerate_for
option at all. As a result, the builder runs on every dart file in a project, which is significant because the builder is implemented in such a way that it fully resolves every Dart library. For large projects, this is an extremely expensive default behavior, especially considering that this builder was added to this library in a minor release and is auto-applied to any project that already depended on mockito and used build_runner.Given the nature of this library, it might make more sense for the default configuration to be that it only runs on files in the
test/
directory. Running the builder on files in other directories would still be possible, it would just require explicit configuration (which seems justifiable).A change like this would be breaking, but I think it's worth considering.
The text was updated successfully, but these errors were encountered: