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

it can't comiple to native #50

Open
jiangyubao opened this issue Jan 30, 2022 · 6 comments
Open

it can't comiple to native #50

jiangyubao opened this issue Jan 30, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@jiangyubao
Copy link

`Info: Compiling with sound null safety

error: import of dart:mirrors is not supported in the current Dart runtime

Error: AOT compilation failed
Generating AOT snapshot failed!`

dart version: 2.5.3
os: macos

@debuggerx01
Copy link
Contributor

angel-dart/angel#103

Remove MirrorsReflector from prod.dart , remove angel_jael dependency and other any dependency contains dart: mirrors will solve this problem

@dukefirehawk
Copy link
Collaborator

Any packages that uses dart:mirrors for reflections won't be able to compile and run in AOT mode. They can only be run in JIT mode. This is the limitation of AOT, see https://dart.dev/tools/dart-compile for more details.

@outersky
Copy link

outersky commented Feb 3, 2022

So is there any plan to replace mirrors with reflectable package?

@dukefirehawk
Copy link
Collaborator

dukefirehawk commented Feb 3, 2022

Unfortunately reflectable is not a drop in replacement of mirror. It uses code generation instead of reflection. Basically, need to regenerate the code every time something is changed, this is not ideal for development. Can try out angel3_container_generator which use reflectable instead of mirror to see if it works for you.

@dukefirehawk dukefirehawk added the enhancement New feature or request label Feb 4, 2022
@outersky
Copy link

outersky commented Feb 4, 2022

According to debuggerx01 's answer: angel-dart/angel#103 ,
I add angel3_container_generator and remove angel3_jael from config.dart , now it can compile to native , GREAT!!!

@atreeon
Copy link

atreeon commented Jun 8, 2022

just for info, if you're using Angel as an ORM and for its database connectivity features, using only those dependencies, it can be compiled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants