Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We have had a request for entry point abstraction for a while, and this CL provides a very simple approach that enables the 'test_reflectable' 'pubspec.yaml' to be abbreviated substantially; it might be quite helpful for others, too, even though it's so simple. It introduces the ability for the transformer to glob the specified entry points, i.e., it uses package 'glob' and the `Glob` method `matches` to test whether a given `AssetId` is an entry point. Consequently, clients of 'reflectable' (including 'test_reflectable') can use a simple `entry_points: ["test/*_test.dart"]` rather than a concrete list with dozens of test file names. We do not support a seemingly even more convenient model: Dropping the `entry_points:` specification entirely and relying on the provided `Asset`s, just testing whether each of them has a `main` (directly or imported). The problem with that is that we would then need to run the analyzer during `declareOutputs`, which would completely undo the response time improvements expected from a lazy transformer. So programmers still have to take the responsibility to declare which files are entry points, but they can now use a wildcard for it---they cannot completely omit this information. Btw, I think this update is awaited so eagerly that it makes sense to go directly to a `pub publish` v0.5.3 when it has been landed. R=sigurdm@google.com Review URL: https://codereview.chromium.org/1722653002 .
- Loading branch information
Showing
5 changed files
with
22 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters