-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support development of VM based Dart code in editor #796
Comments
The current blocking bug on doing this is that the editor uses the dartc compiler to detect syntax errors, and the native keyword is supported by dartc only on static methods. The VM server-side libraries use native on static and instance methods, to specify a C++ implementation. This causes a syntax error when importing the libraries, in order to do type-checking on your code. Without that syntax error, one can make a library that sources all the server-side libraries, and import that library in your files. But we would like better support for editing server-side code in the editor - right now we cannot effectively use it. |
This comment was originally written by [email protected] We should be able to deal with the native keyword as used by the server code. |
I don't think we need to support the native keyword as it is used by the Dart code internal to the VM. When developing Dart code supposed to run on the VM we need to provide a library which sources all the interfaces public classes for Sokcet, File, etc. that is provided by the VM - not the actual implementation. |
This comment was originally written by [email protected] If the ETA for the library is soon then agree. Otherwise, it would be a < 5minute fix to the dartc code. |
I have created an importable library that provides the interfaces, but not the implementations, of the server-side libraries. Importing it into all your (server-side) Dart files lets the editor compile them without finding compilation errors, and provides code completion for the server-side classes. I just concatenated all the public server-side interfaces, and removed the factory declarations. Using this has already shown me many type errors in the code I'm working on. Of course, the editor won't produce a runnable project, since it doesn't use the VM. Attachment: |
I have some pending CLs that will help in this area. In addition, Dan G and I are working towards an SDK consumable by Editor which includes VM libs. |
[user feedback]
I would desire is ability to debug and run it on dart vm.
////////////////////////////////////////////////////////////////////////////////////
Editor Version: 2324
OS: Linux
////////////////////////////////////////////////////////////////////////////////////
The text was updated successfully, but these errors were encountered: