-
Notifications
You must be signed in to change notification settings - Fork 1.7k
dart:mirrors does not yet work with --preview-dart-2 #32345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Support for As far as I know, we have not made any official decision about supporting |
And now I do know: we have made an official announcement that |
Thanks very much for the info, will continue to track issue |
The root cause of the enum not being report as 'isEnum' might be the same one as in #32365 |
Phew, I'm glad dart:mirrors will continue to be supported, without it my code generation would become a bit cumbersome... |
Also running into issues with preview Dart 2. Package unscripted [0] requires dart mirrors fetching method parameters and it fails with a runtime type issue: type 'List' is not a subtype of type 'List' of 'function result' where dart:mirrors _LocalMethodMirror.parameters [0] https://github.com/seaneagan/unscripted/blob/master/lib/src/util.dart#L38 |
@vsmenon do you have any needs here? |
Not that we're aware of at this point. The CFE recently added support for parameter annotations (which we needed for temporary pageloader support). |
As far as I know, mirrors has enough support for DDC+Kernel. We have limited test coverage though, outside of the internal use of pageloader. (When I've regressed something in DDC+Analyzer mirrors, I don't find out until we roll the SDK.) |
It appears that there are a number of VM mirrors tests that are marked as failing in the status files which indicates we still have a number of issues with dart:mirrors functionality in --preview-dart-2 mode. |
@manuelF Package unscripted itself is not a Dart 2 package. I run into a number of Dart 2 static errors when I try to compile it. (That's not to say that all the |
I started to try to fix the failing mirrors tests. At least some of them are incorrect tests. We could argue about them on a case-by-case basis, because the current VM behavior is "incorrect" by that standard and changing the VM's behavior is a breaking change. For example, in Dart 2 the classes defined by anonymous mixin applications should always be abstract, otherwise you will get Dart 2 static errors for any abstract members of the mixed-in class. One of the lib_2/mirrors tests tests that they are not abstract. |
Another example: if an object that is not a Function is passed as the first argument to Function.apply, we will tear off the object's call method and pass that. If it is invoked with an incorrect number of arguments, that will not invoke the original object's noSuchMethod. lib_2/mirrors/apply3_test is broken for this reason. So far, every test I've looked at is a test that was incorrectly ported from Dart 1. We'll need to fix them eventually but it isn't a high priority right now. |
yeah, I saw that when I moved these tests to lib_2/mirrors :\ ... a lot of tests in lib_2/corelib_2/language_2 still don't expect correct runtime behavior for Dart 2. I think the function call tearoff thing happened after the Dart 2 test migration, though. My guess is: we didn't update the tests after the call tearoff change, because many Dart 2 impls lack mirrors support, so it was hard to notice the test problem. |
If there is any way to contribute here as an outsider, please let me know. The issues with mirrors and --preview-dart-2 flag are blocking many of Aqueduct tests. I am anxious that this issue may get deferred until after Dart 2 release or late enough in the process that will delay us releasing with Dart 2. I recognize that there are many other priorities and y'all are killing it, but I did want to express that concern. |
We're definitely aware of this concern. A prioritized list of APIs that you
need would be very helpful.
…On Tue, May 22, 2018 at 12:42 PM Joe Conway ***@***.***> wrote:
If there is any way to contribute here as an outsider, please let me know.
The issues with mirrors and --preview-dart-2 flag are blocking many of
Aqueduct tests. I am anxious that this issue may get deferred until after
Dart 2 release or late enough in the process that will delay us releasing
with Dart 2. I recognize that there are many other priorities and y'all are
killing it, but I did want to express that concern.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#32345 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACAsW76fx9eLSaMWNJF-EcKG2UwXQwMQks5t1GoPgaJpZM4SV7lE>
.
|
To echo what @dgrove said, we could definitely use help identifying the high priority issues that affect you and your tests. You can file separate issues for them and just tag me for triage. Eventually we will fix all those bugs (and probably modernize the API for Dart 2 features), but for now we want to prioritize fixing bugs "on demand" when we know that they are affecting customers. |
Very much appreciated. I've added #33207 and will tag you shortly. |
Bug: #32345 Bug: #33326 Bug: #33345 Change-Id: I89fb8f0332ef6f9f40de59c219af2a7c23e5943f Reviewed-on: https://dart-review.googlesource.com/58400 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Vyacheslav Egorov <[email protected]> Reviewed-by: Alexander Markov <[email protected]>
@kmillikin - can we close this? I think mirrors are working now in the VM? |
all reported issues against dart:mirrors has been fixed after the switch to Dart 2. |
This code prints false when running with --preview-dart-2.
The text was updated successfully, but these errors were encountered: