dart_eval icon indicating copy to clipboard operation
dart_eval copied to clipboard

Add mixins

Open ethanblake4 opened this issue 3 years ago • 2 comments

Multiple interfaces for bridge still need to be figured out.

ethanblake4 avatar May 12 '21 02:05 ethanblake4

Have you ever thought about using front_end instead of dart analyzer to do source code analysis? front_end is used by the dart compiler, which can automatically restore mixins or extension to dart class code。

I did a small project called aspect_ frontend_ server 。 It can inject dart code, intercept the dart function, and is generally used for log collection。

This project actually modifies the official frontend_server code, added the injection code part.

lancexin avatar Mar 08 '23 08:03 lancexin

@lancexin That's a really cool project. However due to dart_eval's bridging functionality, it would be hard to use the front_end package. Because for example in dart_eval you can extend a class that doesn't "exist" in the source code if it is defined as a bridge class.

ethanblake4 avatar Mar 10 '23 00:03 ethanblake4