Skip to content
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

Stability of mirror system for Dart VM #34198

Closed
roman-vanesyan opened this issue Aug 20, 2018 · 6 comments
Closed

Stability of mirror system for Dart VM #34198

roman-vanesyan opened this issue Aug 20, 2018 · 6 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. closed-not-planned Closed as we don't intend to take action on the reported issue library-mirrors

Comments

@roman-vanesyan
Copy link
Contributor

roman-vanesyan commented Aug 20, 2018

Stability consideration for mirror system since Dart 1 mirror system is considered as unstable. There was been another major bump of Dart as Dart 2 was released, were in mirror system is also considered as unstable, before stable release it's been a bit unclear will mirroring be introduced also in Dart 2 or not, now we have it. But can you, please, clarify the state of the mirror system for Dart 2 and what future for it is planning? Mainly I speak here about Dart VM.

@roman-vanesyan roman-vanesyan changed the title Stability of mirror system Stability of mirror system for Dart VM Aug 20, 2018
@matanlurey matanlurey added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Aug 20, 2018
@a-siva
Copy link
Contributor

a-siva commented Aug 21, 2018

You mention that the mirror system was considered unstable in Dart 1, can you elaborate on that with specifics of what is unstable.

In Dart 2 we intended to maintain the same support that we had for dart:mirrors, there could be some issues that we overlooked. Could you elaborate on what you have found.

@zoechi
Copy link
Contributor

zoechi commented Aug 21, 2018

Mirrors support was marked experimental for dart2js as far as I remember and
removed entirely in Dart 2 dart2js and Flutter.
Only the server VM supports mirrors in Dart 2.

@eernstg
Copy link
Member

eernstg commented Aug 21, 2018

It might be relevant to know the following: In a setting where 'dart:mirrors' is not supported you can do most of what 'dart:mirrors' will do using code generation with package reflectable.

@roman-vanesyan
Copy link
Contributor Author

roman-vanesyan commented Aug 21, 2018

@a-siva it is right in the documention of 'dart:mirrors' package, here is fragment from that comment:

 * ## Status: Unstable
 *
 * The dart:mirrors library is unstable and its API might change slightly as a
 * result of user feedback. This library is platform dependent and therefore it
 * has implementations for both dart2js and the Dart VM. Both are under
 * development and may not support all operations yet.

@zoechi Yes, I'm primary about VM support for it.

@eernstg I considered reflectable previously, but the way codegen works is IMHO awful, because of the way it generates code, for example that part of that makes IDEs mad, until code is generated, plus classes with ugly names that we should extend in implementation classes.

@eernstg
Copy link
Member

eernstg commented Aug 21, 2018

@vanesyan,

for example that part of that makes IDEs mad, until code is generated,

In fact, reflectable does not generate any part files, it generates a single file which is intended to be imported from the library that contains your main.

plus classes with ugly names that we should extend in implementation classes.

That is also a property that reflectable doesn't share. However, it may of course be true that your setup will create some situations where the generated file does not yet exist and an IDE may be confused about that (there are many ways to set up your working environment, so I don't know exactly how code generation is triggered and how that's integrated with your IDE).

@a-siva
Copy link
Contributor

a-siva commented Aug 5, 2022

At this point we have no plans for enhancing dart:mirrors library.
Please see #44489 which is investigating a path towards discontinuing support for dart:mirrors

@a-siva a-siva added the closed-not-planned Closed as we don't intend to take action on the reported issue label Aug 5, 2022
@a-siva a-siva closed this as completed Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. closed-not-planned Closed as we don't intend to take action on the reported issue library-mirrors
Projects
None yet
Development

No branches or pull requests

5 participants