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

Issue 1391543003: Creates `reflectors`, as a meta-meta feature that enables dynamic selection of a "mirror system". (Closed)

Created:
5 years, 2 months ago by eernst
Modified:
5 years, 2 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

Creates `reflectors`, as a meta-meta feature enabling dynamic selection of the "mirror system". When a library is expected to be used in a context where some useful reflectors have already been created, it is difficult for that library to find the reflectors, but it is very easy to return the set of all reflectors from a static method in `Reflectable`. As a result, such a library can now offer services using reflectable based reflection, without requiring an `init` method to learn about which reflectors there are, and without creating its own reflector (which may cause a lot of information to be duplicated). R=sigurdm@google.com Committed: https://github.com/dart-lang/reflectable/commit/23de9d2f6b6fe65dd74ab833c11351ea5bc0362e

Patch Set 1 #

Patch Set 2 : Added lots of LibraryMirror support in order to make reflectors work in transformed code #

Total comments: 28

Patch Set 3 : Review response. #

Total comments: 2

Patch Set 4 : Review response. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+987 lines, -189 lines) Patch
M reflectable/lib/reflectable.dart View 1 2 3 2 chunks +14 lines, -1 line 0 comments Download
M reflectable/lib/src/encoding_constants.dart View 1 2 chunks +2 lines, -0 lines 0 comments Download
M reflectable/lib/src/reflectable_mirror_based.dart View 1 2 chunks +32 lines, -1 line 0 comments Download
M reflectable/lib/src/reflectable_transformer_based.dart View 1 2 8 chunks +65 lines, -8 lines 0 comments Download
M reflectable/lib/src/transformer_implementation.dart View 1 2 3 35 chunks +327 lines, -95 lines 0 comments Download
M reflectable/test/mock_tests/check_literal_transform_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M test_reflectable/pubspec.yaml View 1 1 chunk +3 lines, -0 lines 0 comments Download
A + test_reflectable/test/meta_reflector_test.dart View 1 2 3 4 chunks +86 lines, -81 lines 0 comments Download
A test_reflectable/test/meta_reflectors_definer.dart View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A test_reflectable/test/meta_reflectors_domain.dart View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
A test_reflectable/test/meta_reflectors_domain_definer.dart View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A test_reflectable/test/meta_reflectors_meta.dart View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download
A test_reflectable/test/meta_reflectors_test.dart View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A test_reflectable/test/meta_reflectors_user.dart View 1 2 3 1 chunk +138 lines, -0 lines 0 comments Download
M test_reflectable/test/reflected_type_test.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
A test_reflectable/test/reflectors_test.dart View 1 2 3 1 chunk +130 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
eernst
Adds a `reflectors` static method that provides access to all reflectors in the current program.
5 years, 2 months ago (2015-10-06 16:01:31 UTC) #2
sigurdm
(As discussed offline) I am not so happy about exposing the set of Reflectors - ...
5 years, 2 months ago (2015-10-07 08:31:59 UTC) #3
eernst
PTAL, lots of code & debugging was needed in order to support libraries in a ...
5 years, 2 months ago (2015-10-08 18:27:49 UTC) #4
sigurdm
I think "near-agreeing" is a bit of spin :) I give a LGTM - but ...
5 years, 2 months ago (2015-10-09 07:52:04 UTC) #5
eernst
Review response. Note that some redundant elements were removed from `_[gs]ettersOfLibrary`, some functions were renamed ...
5 years, 2 months ago (2015-10-09 10:09:05 UTC) #6
sigurdm
LGTM https://codereview.chromium.org/1391543003/diff/20001/reflectable/lib/src/transformer_implementation.dart File reflectable/lib/src/transformer_implementation.dart (right): https://codereview.chromium.org/1391543003/diff/20001/reflectable/lib/src/transformer_implementation.dart#newcode998 reflectable/lib/src/transformer_implementation.dart:998: })); On 2015/10/09 10:09:05, eernst wrote: > On ...
5 years, 2 months ago (2015-10-09 10:47:20 UTC) #7
eernst
Review response. Landing now. https://codereview.chromium.org/1391543003/diff/20001/reflectable/lib/src/transformer_implementation.dart File reflectable/lib/src/transformer_implementation.dart (right): https://codereview.chromium.org/1391543003/diff/20001/reflectable/lib/src/transformer_implementation.dart#newcode998 reflectable/lib/src/transformer_implementation.dart:998: })); On 2015/10/09 10:47:20, sigurdm ...
5 years, 2 months ago (2015-10-09 11:24:14 UTC) #8
eernst
5 years, 2 months ago (2015-10-09 11:24:38 UTC) #9
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
23de9d2f6b6fe65dd74ab833c11351ea5bc0362e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698