Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Issue 1722653002: Enables globbing for entry points. (Closed)

Created:
4 years, 10 months ago by eernst
Modified:
4 years, 10 months ago
Reviewers:
sigurdm
CC:
eernst+reviews_google.com, reviews_dartlang.org, floitsch
Base URL:
https://github.com/dart-lang/reflectable.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Enables globbing for entry points. 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 Committed: https://github.com/dart-lang/reflectable/commit/8936f98be71cd4325928b8b249b906f83aa54034

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -93 lines) Patch
M coverage_reflectable/bin/unexecuted_lines View 1 chunk +4 lines, -1 line 0 comments Download
M reflectable/lib/src/transformer_implementation.dart View 7 chunks +13 lines, -23 lines 0 comments Download
M reflectable/lib/transformer.dart View 2 chunks +3 lines, -1 line 0 comments Download
M reflectable/pubspec.yaml View 1 chunk +1 line, -0 lines 0 comments Download
M test_reflectable/pubspec.yaml View 1 chunk +1 line, -68 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
eernst
Adds entry point globbing. Reduces the number of lines in 'test_reflectable/pubspec.yaml' by a factor of ...
4 years, 10 months ago (2016-02-22 16:37:13 UTC) #2
sigurdm
LGTM!
4 years, 10 months ago (2016-02-23 08:04:53 UTC) #3
eernst
4 years, 10 months ago (2016-02-24 08:58:57 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
8936f98be71cd4325928b8b249b906f83aa54034 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698