As part of our work to ship Dart 2, we are removing support in our web tools for dart:mirrors and dart:isolate. You will see this change in dart2js and the Dart Dev Compiler in the next few weeks on the Dart SDK dev channel.
Note: the Dart VM will continue to fully support both libraries.
Details:
dart:mirrors - This library provides a runtime reflection API. To provide a full fidelity experience, Dart JavaScript compilers included a substantial amount of type information while also losing the ability to do precise tree-shaking. This leads to dramatically increased output size and execution time. We recommend web developers use code generation using tools like package:build and package:source_gen. These are the tools used by AngularDart and package:json_serializable.
I am currently using dart Isolate in the browser. I would be happy to switch to WebWorker, but I cannot find any documentation on Dart WebWorkers, only JS.
Also, can you elaborate on when my current Isolate code will stop working.
Will the API be completely different from isolates? Is there any roadmap for the parallel computations in Dart (browser and VM)?I apologize if I sound negative (you guys have done awesome work with Dart which I appreciate a lot), but isn't it a step backwards? We have an API that already works fine across platforms.
The plan is to make it incompatible. Why? If the only reason is the overhead for JS compilation, perhaps it can be improved somehow?
On Saturday, February 24, 2018 at 1:17:51 PM UTC-5, Kevin Moore wrote:
On Saturday, February 24, 2018 at 10:02:30 AM UTC-8, John Yendt wrote:I am currently using dart Isolate in the browser. I would be happy to switch to WebWorker, but I cannot find any documentation on Dart WebWorkers, only JS.We're working on updating the APIs that dart:html and friends are based on. Stay tuned!
--
You received this message because you are subscribed to a topic in the Google Groups "Dart Misc" group.
To unsubscribe from this topic, visit https://groups.google.com/a/dartlang.org/d/topic/misc/djfFMNCWmkE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to misc+uns...@dartlang.org.
It could be, but that would also mean potentially never making the Dart VM/Flutter AOT multi-threading substantially better, because it would have to support the lowest-common denominator of whatever JS supports (web workers).
Matan,Thanks for the explanation, now I understand the reasons behind the decision better. It will certainly be nice to be able to use the latest features of the JS platform, but still, I see a lot of value in being able to process data in parallel in the same way across platforms. I wonder if it would be possible for us to develop a layer that would parallelize algorithms and use either isolates, or Web Workers depending on the platform? Let's imagine we are writing a compression utility, how would we compress several arrays in parallel?It could be, but that would also mean potentially never making the Dart VM/Flutter AOT multi-threading substantially better, because it would have to support the lowest-common denominator of whatever JS supports (web workers).Why not implement whatever JS supports (Web workers, SharedArrayBuffer) with isolates,
therefore making it cross-platform, and make advanced VM-related functionality (by the way, are there any plans to do it?) available only in the VM?In any case, thanks for the work you are doing - and I am looking forward to see the updated dart:html and other improvements!
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to a topic in the Google Groups "Dart Misc" group.
To unsubscribe from this topic, visit https://groups.google.com/a/dartlang.org/d/topic/misc/djfFMNCWmkE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to misc+uns...@dartlang.org.
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/e4cccb56-8541-4ee8-b3e0-dcc04f2bdd4c%40dartlang.org.
It's really sad. We are using mirrors a lot in our project. We have classes, annotated with special parameters and can generate info apon that annotations, set field data and so on. What can we do in Dart 2?
суббота, 24 февраля 2018 г., 4:05:53 UTC+3 пользователь 'Kevin Moore' via Dart Announcements написал:--As part of our work to ship Dart 2, we are removing support in our web tools for dart:mirrors and dart:isolate. You will see this change in dart2js and the Dart Dev Compiler in the next few weeks on the Dart SDK dev channel.
Note: the Dart VM will continue to fully support both libraries.
Details:
dart:isolate - This library was an attempt to provide a single API that provides common concurrency functionality across Dart's web and native platforms. While useful in some cases, most users found the isolate API limiting compared to the Web Workers API. The infrastructure for supporting isolates also adds substantial overhead when compiling to JavaScript. In the future, you should use Web Workers to access concurrency on the web.
dart:mirrors - This library provides a runtime reflection API. To provide a full fidelity experience, Dart JavaScript compilers included a substantial amount of type information while also losing the ability to do precise tree-shaking. This leads to dramatically increased output size and execution time. We recommend web developers use code generation using tools like package:build and package:source_gen. These are the tools used by AngularDart and package:json_serializable.
If you have questions about this change, please post on the Dart discussion group.
For more news and information, visit https://plus.google.com/+dartlang
To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/e4cccb56-8541-4ee8-b3e0-dcc04f2bdd4c%40dartlang.org.