ethanblake4 / dart_eval Goto Github PK
View Code? Open in Web Editor NEWExtensible Dart interpreter for Dart with full interop
Home Page: https://pub.dev/packages/dart_eval
License: BSD 3-Clause "New" or "Revised" License
Extensible Dart interpreter for Dart with full interop
Home Page: https://pub.dev/packages/dart_eval
License: BSD 3-Clause "New" or "Revised" License
Reproduction:
void _print() {
try {
print('a');
} catch (e) {
print('b');
}
}
Multiple interfaces for bridge still need to be figured out.
dart_eval should have a tool to scan an existing package (including the Dart and Flutter SDK) and auto-generate bindings. Maybe can use package:build?
(for anyone who finds this: If you need to write bindings right now I suggest using GitHub Copilot, it does a fairly good job generating the boilerplate)
Bindings for Flutter are highly requested. Long term, this will come as a result of #20 but in the short term it would be nice to have some basic support for common Flutter widgets.
Already has runtime component, need support in compiler
Only a few of the String methods have been implemented so far.
I have a in-progress PR to implement the remainder.
Similar to the issue just now, looking at https://github.com/ethanblake4/dart_eval/pull/36/files I guess things like String.endsWith
are manually bridged? If so, maybe we can auto generate it. You know, writing down those things by hand is very time consuming and error-prone, since we are humans not machines ;)
This requires changes to EvalAssignmentExpression but most likely nothing else. See PostfixExpression for a good reference.
original class
class OpenApiAsyncDebug {
final name = "open async debug";
Future<String> helloWorld() async {
return "helloWorld";
}
Future<String> echo(String str) async {
return str;
}
}
bridge class
import 'package:dart_eval/dart_eval_bridge.dart';
class OpenApiAsyncBridge {
static const $type = BridgeTypeReference.unresolved(
BridgeUnresolvedTypeReference(
'package:paas_dashboard_flutter/open/open_api_debug_async.dart', 'OpenApiAsyncDebug'),
[]);
static const $declaration = BridgeClassDeclaration($type, isAbstract: false, constructors: {}, methods: {
'helloWorld': BridgeMethodDeclaration(
false,
BridgeFunctionDescriptor(
BridgeTypeAnnotation(
BridgeTypeReference.unresolved(BridgeUnresolvedTypeReference('dart:core', 'Future'), []), false),
{},
[],
{})),
}, getters: {}, setters: {}, fields: {});
}
eval code
static void evalPiece(String piece) {
var compiler = Compiler();
compiler.defineBridgeClasses([OpenApiAsyncBridge.$declaration]);
final code = "void main() async {\n"
+ "final openApiSyncDebug = OpenApiSyncDebug();\n"
+ "final openApiAsyncDebug = OpenApiAsyncDebug();\n"
+ piece + "\n"
+ "}";
final program = compiler.compile({
'package:example': {
'main.dart': code
}
});
final runtime = Runtime.ofProgram(program);
runtime.execute(0);
}
Error Message
Failed to load "/Users/xxxxxx/code/flutter/paas_dashboard_flutter/test/eval/eval_service_test_debug_async_helloworld.dart": Null check operator used on a null value
This will need:
Support in the parser (parser.dart)
A new EvalSet type in primitives.dart
A new DartSetLiteral class in literals.dart
???
Hi @ethanblake4 ! I think we exchanged some posts over Reddit about a year ago (and what a long year it's been).
I'm a huge fan of your work! I think it's amazing that you're building a DBC interpreter in Dart!
I'm building Hydro-SDK. Hydro-SDK aims to allow developers to author Flutter content and to publish and update that content over the air (outside the app stores). I gave a talk about Hydro-SDK last year at DartUP (where I also mentioned dart_eval
๐ ).
Hydro-SDK accomplishes this by providing an embedded Lua interpreter written in Dart and a toolchain to compile Typescript to Lua, compile, package and distribute code. The Lua VM supports hot reload with some limitations. There's some limitations to the Typescript support as well.
I've been focused the last year on building out tools for automatic binding generation to allow using arbitrary Dart packages with Hydro-SDK.
Everything about Hydro-SDK aims to be as language agnostic as possible. I would love to collaborate on embedding dart_eval
into Hydro-SDK later this year if you're interested. At the very least, I'd love to compare notes with you on binding systems and VMs. ๐
(I am not against you! Just because if we are going to make it the solution, we have to think about all possible opposite voices by ourselves.)
So, what if someone (or us?) implements hot update via:
(Hixie also mentioned these in 14330)
My non-mature answer:
P.S. For some existing hot update solutions, here is a comparison article: https://juejin.cn/post/7033708048321347615 (Not in English, may need a translator...)
The dart_eval CLI should compile app dependencies from Pub, etc. Data about packages created by "pub get" is in .dart_tool/package_config.json.
BridgeTypeAnnotation($TimestampedTime.$type, false)
I saw the example in dart_eval_example
, how to define a type which returns Future<String>
So, do you plan to make it a prototype or experiment or toy, or make it the ultimate solution to Flutter hot update?
If the former, I completely understand since nobody has infinite free time. If the latter, I would like to spend some more time looking at it, trying to see e.g. performance/architecture/whatever improvements.
If this is to be the solution of flutter hot update, IMHO discussing with more smart people may be helpful. For example, there may be serious problems that we both have not realized which completely blocks the package - good to know it earlier than later.
In addition, since Hot Update is the most upvoted issue in Flutter repo, I guess there will be some more people interested in this package and have the open-source spirits. Then, this package may have some PR and develop faster, i.e. gain hot-update sooner.
Possible locations that I come up with (probably also other places that I do no know):
Example: Generate or crawl a ton of random valid Dart code. Then feed it into both dart_eval and standard Dart, and check output. If they are not equal, we successfully find a bug.
IMHO (hopefully I am not too optimistic about this!) with the open source library of you and me, maybe we can create a full hot-update solution and solve the flutter/flutter#14330.
I guess maybe we need to finish these components:
Anyway this issue is not a real "issue" (problem), but just a little reminder about what I think :)
Recall that, it is O(1) not O(N) to pass data back to main isolate, if the extra isolate send it via terminating message.
For example: from raw bytes to objects, including bridge methods etc. So that in main isolate we only need to call that (dynamic) function and done.
For example, is it possiable to implement package:http with this lib like
import 'package:http/http.dart';
var parser = Parse();
var scope = parser.parse('''
class Test extends T{
String uri = 'https://www.google.com';
late Map<String, String> headers;
test() {
headers = {"referer": uri};
}
@override
getResponse() async {
return await get(Uri.parse(url), headers: headers);
}
}
Test get() {
return Test();
}
''');
var test= scope('get', []) as T;
var response = test.response();
First off thank you very much for creating this awesome package!
I cloned current main
(18999d0) and tried to run the example but I get these errors:
dart dart_eval_example.dart
../lib/src/eval/compiler/context.dart:2:8: Error: Error when reading '../lib/source_node_wrapper.dart': No such file or directory
import 'package:dart_eval/source_node_wrapper.dart';
^
../lib/src/eval/compiler/context.dart:203:28: Error: The method 'BuiltinValue' isn't defined for the class 'CompilerContext'.
- 'CompilerContext' is from 'package:dart_eval/src/eval/compiler/context.dart' ('../lib/src/eval/compiler/context.dart').
Try correcting the name to the name of an existing method, or defining a method named 'BuiltinValue'.
final _index = BuiltinValue(intval: frameRef[i + 1].scopeFrameOffset).push(this);
^^^^^^^^^^^^
../lib/src/eval/compiler/context.dart:209:26: Error: The method 'BuiltinValue' isn't defined for the class 'CompilerContext'.
- 'CompilerContext' is from 'package:dart_eval/src/eval/compiler/context.dart' ('../lib/src/eval/compiler/context.dart').
Try correcting the name to the name of an existing method, or defining a method named 'BuiltinValue'.
final _index = BuiltinValue(intval: v.scopeFrameOffset).push(this);
It seems like source_node_wrapper.dart
hadn't been commited? I saw there was a dev dep on builder_runner
so I ran it, but that didn't generate any files.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโ Exception caught by gesture โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Cannot open file, path = 'out.dbc' (OS Error: Read-only file system, errno = 30)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Hi, this project looks great and looks like a big amount of work! Excited to see it is still growing, and looking forward to seeing it in production :)
If I understand correctly, this looks like a Dart interpreter. Is it possible that we directly contribute to the dartlang repo and create an interpreter there? They use C++ so I guess the interpretation may run faster since we can control more low-level things.
Given that Dart already have JIT and AOT, adding an interpreted mode looks like something that will be accepted there.
Bytedance maintain a fork of Dart that does interpretation, for a similar reason; one could use that (I think it's public?). (by hixie in flutter/flutter#14330 (comment)
So technically speaking, it should also be implementable.
I really want to see hot-update become reality. That's why I am suggesting this. Because I am quite afraid many people will not choose an interpreter that is not in the dart repository.
Another advantage is that, we can utilize all infra of dart sdk internals. There must be a lot of optimizations etc already there that we may even be able to reuse :)
This requires support in the parser (parser.dart) and a new PrefixExpression class in expressions.dart. See PostfixExpression for a good reference.
Hi,
the following code is taken from README.md.
It will result in list of Errors using ^0.4.1.
test('dart_eval', () {
final program = '''
class Cat {
Cat(this.name);
final String name;
String speak() {
return name;
}
}
String main() {
final cat = Cat('Fluffy');
return cat.speak();
}
''';
print(eval(program, function: 'main')); // -> 'F
});
: Error: The getter 'name2' isn't defined for the class 'NamedCompilationUnitMember'.
../โฆ/compiler/compiler.dart:403
- 'NamedCompilationUnitMember' is from 'package:analyzer/dart/ast/ast.dart' ('../../../../flutter_sdk/.pub-cache/hosted/pub.dartlang.org/analyzer-4.2.0/lib/dart/ast/ast.dart').
package:analyzer/โฆ/ast/ast.dart:1
Try correcting the name to the name of an existing getter, or defining a getter or field named 'name2'.
final name = declaration.name2.value() as String;
^^^^^
: Error: The getter 'name2' isn't defined for the class 'MethodDeclaration'.
../โฆ/compiler/compiler.dart:416
- 'MethodDeclaration' is from 'package:analyzer/dart/ast/ast.dart' ('../../../../flutter_sdk/.pub-cache/hosted/pub.dartlang.org/analyzer-4.2.0/lib/dart/ast/ast.dart').
package:analyzer/โฆ/ast/ast.dart:1
Try correcting the name to the name of an existing getter, or defining a getter or field named 'name2'.
final mName = member.name2.value() as String;
^^^^^
: Error: The getter 'name2' isn't defined for the class 'ClassDeclaration'.
../โฆ/compiler/compiler.dart:432
- 'ClassDeclaration' is from 'package:analyzer/dart/ast/ast.dart' ('../../../../flutter_sdk/.pub-cache/hosted/pub.dartlang.org/analyzer-4.2.0/lib/dart/ast/ast.dart').
package:analyzer/โฆ/ast/ast.dart:1
Try correcting the name to the name of an existing getter, or defining a getter or field named 'name2'.
final name = (declaration.name2.value() as String) + '.' + (field.name2.value() as String);
For example, not sure what "wrap" is (not check code yet), but if possible, we should avoid a wrapping, since that generate more objects, i.e. more indirection (slower) and more garbage (gc slower).
Needs runtime support and symbol recognition for compileBinaryExpression. Should probably be ops so dart_eval can evaluate without boxing.
dart_eval should support the new super property syntax sugar, eg:
class X extends Y {
X(super.prop);
}
Hi @ethanblake4, this is truly a great lib & exactly what I was looking for. You have mentioned that we can use Flutter widgets with this lib. I tried to add them using the example you have mentioned. But from my approach, it seems I have to add boilerplate code for all the required Widgets ie for text, container, etc. Is there a better way to approach this? Could you share an example, if possible? Thanks.
With the current main branch (06dda6a) I get the following tests failing.
It looks like they are all around the result having a extra type prefix, eg.
Expected: <8>
Actual: $int:<8>
Should they all be updated for the new dollar-sign prefix?
Also would it be worth setting up a Github actions CI build for this repo to catch these in the future?
I'm happy to contribute a PR to fix both these if you would like?
uilt test:test.
00:04 +12 -1: test/dart_eval_test.dart: Class tests Field formal parameters, external field access [E]
Null check operator used on a null value
package:dart_eval/src/eval/compiler/expression/identifier.dart 49:67 resolveInstanceDeclaration
package:dart_eval/src/eval/compiler/reference.dart 134:35 IdentifierReference.getValue
package:dart_eval/src/eval/compiler/expression/identifier.dart 13:48 compileIdentifier
package:dart_eval/src/eval/compiler/expression/method_invocation.dart 31:20 compileMethodInvocation
package:dart_eval/src/eval/compiler/expression/expression.dart 27:12 compileExpression
package:dart_eval/src/eval/compiler/statement/variable_declaration.dart 25:19 compileVariableDeclarationList
package:dart_eval/src/eval/compiler/statement/variable_declaration.dart 12:3 compileVariableDeclarationStatement
package:dart_eval/src/eval/compiler/statement/statement.dart 19:12 compileStatement
package:dart_eval/src/eval/compiler/statement/block.dart 16:20 compileBlock
package:dart_eval/src/eval/compiler/declaration/function.dart 49:14 compileFunctionDeclaration
package:dart_eval/src/eval/compiler/declaration/declaration.dart 18:5 compileDeclaration
package:dart_eval/src/eval/compiler/compiler.dart 248:9 Compiler.compileSources.<fn>.<fn>
dart:collection _LinkedHashMapMixin.forEach
package:dart_eval/src/eval/compiler/compiler.dart 237:13 Compiler.compileSources.<fn>
dart:collection _LinkedHashMapMixin.forEach
package:dart_eval/src/eval/compiler/compiler.dart 234:30 Compiler.compileSources
package:dart_eval/src/eval/compiler/compiler.dart 80:12 Compiler.compile
package:dart_eval/src/eval/compiler/compiler.dart 288:21 Compiler.compileWriteAndLoad
test/dart_eval_test.dart 276:24 main.<fn>.<fn>
00:04 +12 -2: test/dart_eval_test.dart: Class tests "this" keyword [E]
Expected: <8>
Actual: $int:<8>
package:test_api expect
test/dart_eval_test.dart 327:7 main.<fn>.<fn>
00:04 +12 -3: test/dart_eval_test.dart: Class tests Implicit and "this" field access from closure [E]
Expected: <12>
Actual: $int:<12>
package:test_api expect
test/dart_eval_test.dart 358:7 main.<fn>.<fn>
00:04 +12 -4: test/dart_eval_test.dart: Class tests Simple static method [E]
Expected: <10>
Actual: $int:<10>
package:test_api expect
test/dart_eval_test.dart 378:7 main.<fn>.<fn>
00:04 +12 -5: test/dart_eval_test.dart: Class tests Implicit static method scoping [E]
Expected: <3>
Actual: $int:<3>
package:test_api expect
test/dart_eval_test.dart 406:7 main.<fn>.<fn>
00:04 +20 -6: test/dart_eval_test.dart: File and library composition Import hiding [E]
Null check operator used on a null value
package:dart_eval/src/eval/compiler/expression/identifier.dart 49:67 resolveInstanceDeclaration
package:dart_eval/src/eval/compiler/reference.dart 134:35 IdentifierReference.getValue
package:dart_eval/src/eval/compiler/expression/identifier.dart 13:48 compileIdentifier
package:dart_eval/src/eval/compiler/expression/method_invocation.dart 31:20 compileMethodInvocation
package:dart_eval/src/eval/compiler/expression/expression.dart 27:12 compileExpression
package:dart_eval/src/eval/compiler/statement/variable_declaration.dart 25:19 compileVariableDeclarationList
package:dart_eval/src/eval/compiler/statement/variable_declaration.dart 12:3 compileVariableDeclarationStatement
package:dart_eval/src/eval/compiler/statement/statement.dart 19:12 compileStatement
package:dart_eval/src/eval/compiler/statement/block.dart 16:20 compileBlock
package:dart_eval/src/eval/compiler/declaration/function.dart 49:14 compileFunctionDeclaration
package:dart_eval/src/eval/compiler/declaration/declaration.dart 18:5 compileDeclaration
package:dart_eval/src/eval/compiler/compiler.dart 248:9 Compiler.compileSources.<fn>.<fn>
dart:collection _LinkedHashMapMixin.forEach
package:dart_eval/src/eval/compiler/compiler.dart 237:13 Compiler.compileSources.<fn>
dart:collection _LinkedHashMapMixin.forEach
package:dart_eval/src/eval/compiler/compiler.dart 234:30 Compiler.compileSources
package:dart_eval/src/eval/compiler/compiler.dart 80:12 Compiler.compile
test/dart_eval_test.dart 639:32 main.<fn>.<fn>
00:04 +20 -7: test/dart_eval_test.dart: File and library composition Export chains [E]
Null check operator used on a null value
package:dart_eval/src/eval/compiler/expression/identifier.dart 49:67 resolveInstanceDeclaration
package:dart_eval/src/eval/compiler/reference.dart 134:35 IdentifierReference.getValue
package:dart_eval/src/eval/compiler/expression/identifier.dart 13:48 compileIdentifier
package:dart_eval/src/eval/compiler/expression/method_invocation.dart 31:20 compileMethodInvocation
package:dart_eval/src/eval/compiler/expression/expression.dart 27:12 compileExpression
package:dart_eval/src/eval/compiler/statement/variable_declaration.dart 25:19 compileVariableDeclarationList
package:dart_eval/src/eval/compiler/statement/variable_declaration.dart 12:3 compileVariableDeclarationStatement
package:dart_eval/src/eval/compiler/statement/statement.dart 19:12 compileStatement
package:dart_eval/src/eval/compiler/statement/block.dart 16:20 compileBlock
package:dart_eval/src/eval/compiler/declaration/function.dart 49:14 compileFunctionDeclaration
package:dart_eval/src/eval/compiler/declaration/declaration.dart 18:5 compileDeclaration
package:dart_eval/src/eval/compiler/compiler.dart 248:9 Compiler.compileSources.<fn>.<fn>
dart:collection _LinkedHashMapMixin.forEach
package:dart_eval/src/eval/compiler/compiler.dart 237:13 Compiler.compileSources.<fn>
dart:collection _LinkedHashMapMixin.forEach
package:dart_eval/src/eval/compiler/compiler.dart 234:30 Compiler.compileSources
package:dart_eval/src/eval/compiler/compiler.dart 80:12 Compiler.compile
test/dart_eval_test.dart 670:32 main.<fn>.<fn>
00:04 +23 -7: Some tests failed.
This requires support in the parser and a new InterpolatedStringExpression class or similar.
(Have not checked into details, just rough ideas.) Maybe we can utilize the tests inside official dart repo, so that we get a ton of test cases to verify dart-eval is correct, at least up to those tests in the dart repo :)
I tried to run the following example code. But it failed with the following errors.
import 'package:dart_eval/dart_eval.dart';
import 'package:dart_eval/dart_eval_bridge.dart';
import 'package:dart_eval/stdlib/core.dart';
void main() {
final compiler = Compiler();
final program = compiler.compile({
'my_package': {
'main.dart': '''
String hello(String params) {
return "hello, \$params";
}
void main(List<String> args) {
print(hello(args[0]));
}
'''
}
});
final runtime = Runtime.ofProgram(program);
runtime.setup();
runtime.executeLib(
'package:my_package/main.dart', 'main', [$String('nice to meet you')]);
}
>dart example1.dart
Unhandled exception:
dart_eval runtime exception: type '$String' is not a subtype of type 'List<dynamic>' in type cast
#0 IndexList.run (package:dart_eval/src/eval/runtime/ops/primitives.dart:346:70)
#1 Runtime.execute (package:dart_eval/src/eval/runtime/runtime.dart:457:12)
#2 Runtime.executeNamed (package:dart_eval/src/eval/runtime/runtime.dart:448:12)
RUNTIME STATE
=============
Program offset: 15
Stack sample: [Instance of '$String', 0, null, null, null, null, null, null, null, null]
Call stack: [0, -1]
TRACE:
9: InvokeDynamic (L2.+)
10: PushReturnValue ()
11: Return (L4)
12: Pop (1)
13: PushScope (F2:86, 'main()')
14: PushConstantInt (0)
15: IndexList (L0[L1]) <<< EXCEPTION
16: PushArg (L2)
17: Call (@0)
18: PushReturnValue ()
#0 Runtime.execute (package:dart_eval/src/eval/runtime/runtime.dart:464:7)
#1 Runtime.executeNamed (package:dart_eval/src/eval/runtime/runtime.dart:448:12)
#2 Runtime.executeLib (package:dart_eval/src/eval/runtime/runtime.dart:443:12)
#3 main (file:///D:/code/flutter/dart_eval/example/example1.dart:25:11)
#4 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
#5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
>
And I also tried to change the last line of code to runtime.executeLib('package:my_package/main.dart', 'main', ['nice to meet you']);
then it produced a similar error dart_eval runtime exception: type 'String' is not a subtype of type 'List<dynamic>' in type cast
.
Thanks for your reply :)
Support bool literals true
and false
For example, say I release v1.0.0 app with 10 pages. Then in v1.0.1, I change the UI (i.e. HomePage.build), and a few logic (e.g. HomePage.handleMyButtonClick).
Then, would be great to have all other pages (SecondPage, ThirdPage, ...) all in AOT, and also making all other untouched methods in HomePage still AOT, while only making HomePage.build and HomePage.handleMyButtonClick interpreted.
This is because an app will not change most of things in a hot update.
(Not sure whether I have mentioned this thought somewhere before)
This will need:
Support in the parser (parser.dart)
A DartWhileStatement class that executes the while loop (statements.dart)
See the for loop class for reference
Should support boxing bool types
Right now unresolved imports just fail with a generic stack trace.
See post by @zmtzawqlp in ethanblake4/flutter_eval#9 (comment)_
I'm trying to figure out what is supported for core types. Eg I have a simple test harness:
import 'package:dart_eval/dart_eval.dart';
void main(List<String> arguments) {
final program = '''
int main() {
// my test code goes here
}
''';
print("eval result:${eval(program)}");
}
If my program text is:
bool main() {
final cat = 'Fluffy';
return cat.isEmpty;
}
I get the expected result: eval result:false
For:
String main() {
final cat = 'Fluffy';
return cat.substring(0,2);
}
However I get:
Unhandled exception:
Null check operator used on a null value
#0 resolveInstanceMethod (package:dart_eval/src/eval/compiler/expression/method_invocation.dart:201:62)
#1 new AlwaysReturnType.fromInstanceMethod (package:dart_eval/src/eval/compiler/type.dart:438:16)
#2 AlwaysReturnType.fromInstanceMethodOrBuiltin (package:dart_eval/src/eval/compiler/type.dart:471:28)
#3 Variable.invoke (package:dart_eval/src/eval/compiler/variable.dart:210:28)
#4 _invokeWithTarget (package:dart_eval/src/eval/compiler/expression/method_invocation.dart:135:14)
#5 compileMethodInvocation (package:dart_eval/src/eval/compiler/expression/method_invocation.dart:29:12)
#6 compileExpression (package:dart_eval/src/eval/compiler/expression/expression.dart:27:12)
#7 compileReturn (package:dart_eval/src/eval/compiler/statement/return.dart:38:17)
#8 compileStatement (package:dart_eval/src/eval/compiler/statement/statement.dart:24:12)
#9 compileBlock (package:dart_eval/src/eval/compiler/statement/block.dart:16:20)
#10 compileFunctionDeclaration (package:dart_eval/src/eval/compiler/declaration/function.dart:49:14)
#11 compileDeclaration (package:dart_eval/src/eval/compiler/declaration/declaration.dart:18:5)
#12 Compiler.compileSources.<anonymous closure>.<anonymous closure> (package:dart_eval/src/eval/compiler/compiler.dart:248:9)
#13 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:614:13)
#14 Compiler.compileSources.<anonymous closure> (package:dart_eval/src/eval/compiler/compiler.dart:237:13)
#15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:614:13)
#16 Compiler.compileSources (package:dart_eval/src/eval/compiler/compiler.dart:234:30)
#17 Compiler.compile (package:dart_eval/src/eval/compiler/compiler.dart:80:12)
#18 eval (package:dart_eval/src/eval/eval.dart:29:28)
#19 main (file:///home/maks/work/dart_eval/example/minimal_example.dart:11:24)
#20 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
#21 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
Is this because only Getters/Setters are curently supported?
The reason I'm trying this is to see if its possible now or in future for dart_eval
to do "transparent" interop with "real dart" code.
I apologise if this is a silly question, as Ihaven't really been able to figure out yet how dart_eval
calls into "real dart".
Function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.