Discussion:
[dart-misc] [dart-announce] Dart2 Breaking Change: Removing web support for dart:mirrors and dart:isolate
'Kevin Moore' via Dart Announcements
2018-02-24 01:05:44 UTC
Permalink
As part of our work to ship Dart 2 <https://www.dartlang.org/dart-2>, we
are removing support in our *web tools* for dart:mirrors
<https://api.dartlang.org/dev/dart-mirrors/dart-mirrors-library.html> and
dart:isolate
<https://api.dartlang.org/dev/dart-isolate/dart-isolate-library.html>. You
will see this change in dart2js <https://webdev.dartlang.org/tools/dart2js>
and the Dart Dev Compiler <https://webdev.dartlang.org/tools/dartdevc> in the
next few weeks on the Dart SDK dev channel
<https://www.dartlang.org/install#about-sdk-release-channels-and-version-strings>
.


*Note: the **Dart VM <https://www.dartlang.org/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
<https://developer.mozilla.org/en-US/docs/Web/API/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 <https://en.wikipedia.org/wiki/Tree_shaking>. This
leads to dramatically increased output size and execution time. We
recommend web developers use code generation using tools like package:build
<https://pub.dartlang.org/packages/build> and package:source_gen
<https://pub.dartlang.org/packages/source_gen>. These are the tools used by
AngularDart <https://webdev.dartlang.org/angular> and
package:json_serializable
<https://pub.dartlang.org/packages/json_serializable>.

If you have questions about this change, please post on the Dart discussion
group <https://groups.google.com/a/dartlang.org/forum/#!forum/misc>.
--
For more news and information, visit https://plus.google.com/+dartlang

To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Frank Rollpin
2018-02-24 04:55:29 UTC
Permalink
So there will no longer be a way to use the same concurrent code on both
server and client side? This is unfortunate as we are doing just that, it
really is a killer feature of Dart. I was really hoping that the Dart team
would instead enhance the Isolates API to make it on par with WebWorkers
(using shared memory, etc).

I guess we will need to come up with some sort of abstraction layer now :(

On Friday, February 23, 2018 at 8:05:53 PM UTC-5, 'Kevin Moore' via Dart
Post by 'Kevin Moore' via Dart Announcements
As part of our work to ship Dart 2 <https://www.dartlang.org/dart-2>, we
are removing support in our *web tools* for dart:mirrors
<https://api.dartlang.org/dev/dart-mirrors/dart-mirrors-library.html> and
dart:isolate
<https://api.dartlang.org/dev/dart-isolate/dart-isolate-library.html>.
You will see this change in dart2js
<https://webdev.dartlang.org/tools/dart2js> and the Dart Dev Compiler
<https://webdev.dartlang.org/tools/dartdevc> in the next few weeks on the Dart
SDK dev channel
<https://www.dartlang.org/install#about-sdk-release-channels-and-version-strings>
.
*Note: the **Dart VM <https://www.dartlang.org/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
<https://developer.mozilla.org/en-US/docs/Web/API/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 <https://en.wikipedia.org/wiki/Tree_shaking>. This
leads to dramatically increased output size and execution time. We
recommend web developers use code generation using tools like
package:build <https://pub.dartlang.org/packages/build> and
package:source_gen <https://pub.dartlang.org/packages/source_gen>. These
are the tools used by AngularDart <https://webdev.dartlang.org/angular>
and package:json_serializable
<https://pub.dartlang.org/packages/json_serializable>.
If you have questions about this change, please post on the Dart
discussion group
<https://groups.google.com/a/dartlang.org/forum/#!forum/misc>.
--
For more news and information, visit https://plus.google.com/+dartlang
To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Istvan Soos
2018-02-24 15:57:38 UTC
Permalink
I think you can still have the same concurrent semantics, but need to
do some tweaks (e.g. webworkers can be started only via a script).

+1 for an abstraction layer. About a year ago I've started this, but
never really concluded how it should look like:
https://github.com/isoos/message_hub

If somebody would love to pick it up, I'm happy to help...

Cheers,
Istvan
Post by Frank Rollpin
So there will no longer be a way to use the same concurrent code on both
server and client side? This is unfortunate as we are doing just that, it
really is a killer feature of Dart. I was really hoping that the Dart team
would instead enhance the Isolates API to make it on par with WebWorkers
(using shared memory, etc).
I guess we will need to come up with some sort of abstraction layer now :(
On Friday, February 23, 2018 at 8:05:53 PM UTC-5, 'Kevin Moore' via Dart
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.
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 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 the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Tobe Osakwe
2018-02-24 16:07:41 UTC
Permalink
One solution that’s worked for me is just using package:stream_controller
and package:json_rpc_2.

It’s easy to create a channel between the main thread and a web worker and
send messages back and forth. You can use the same json_rpc_2 utilities
across Isolates in the VM, too.
Post by Istvan Soos
I think you can still have the same concurrent semantics, but need to
do some tweaks (e.g. webworkers can be started only via a script).
+1 for an abstraction layer. About a year ago I've started this, but
https://github.com/isoos/message_hub
If somebody would love to pick it up, I'm happy to help...
Cheers,
Istvan
Post by Frank Rollpin
So there will no longer be a way to use the same concurrent code on both
server and client side? This is unfortunate as we are doing just that, it
really is a killer feature of Dart. I was really hoping that the Dart
team
Post by Frank Rollpin
would instead enhance the Isolates API to make it on par with WebWorkers
(using shared memory, etc).
I guess we will need to come up with some sort of abstraction layer now
:(
Post by Frank Rollpin
On Friday, February 23, 2018 at 8:05:53 PM UTC-5, 'Kevin Moore' via Dart
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
Post by Frank Rollpin
and the Dart Dev Compiler in the next few weeks on the Dart SDK dev
channel.
Post by Frank Rollpin
Note: the Dart VM will continue to fully support both libraries.
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
Post by Frank Rollpin
isolates also adds substantial overhead when compiling to JavaScript.
In the
Post by Frank Rollpin
future, you should use Web Workers to access concurrency on the web.
dart:mirrors - This library provides a runtime reflection API. To
provide
Post by Frank Rollpin
a full fidelity experience, Dart JavaScript compilers included a
substantial
Post by Frank Rollpin
amount of type information while also losing the ability to do precise
tree-shaking. This leads to dramatically increased output size and
execution
Post by Frank Rollpin
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/
Post by Frank Rollpin
--
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
Post by Frank Rollpin
---
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
--
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 the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
John Yendt
2018-02-24 12:10:02 UTC
Permalink
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.
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Kevin Moore' via Dart Misc
2018-02-24 18:17:51 UTC
Permalink
Post by John Yendt
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
<https://api.dartlang.org/dev/2.0.0-dev.30.0/dart-html/dart-html-library.html>
and friends are based on. Stay tuned!
Post by John Yendt
Also, can you elaborate on when my current Isolate code will stop
working.
If you're using Dart 1.24.x, it will continue to work – although when Dart
2 comes out, you'll like want to upgrade.

If you're following the Dart 2 dev releases, expect isolate on the web to
stop working in the coming weeks.
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Andrew Skalkin
2018-02-24 22:10:00 UTC
Permalink
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?
Post by 'Kevin Moore' via Dart Misc
Post by John Yendt
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
<https://api.dartlang.org/dev/2.0.0-dev.30.0/dart-html/dart-html-library.html>
and friends are based on. Stay tuned!
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Matan Lurey
2018-02-24 22:25:33 UTC
Permalink
Post by Andrew Skalkin
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.
*Sort of.*

Part of the isolate API has never worked (spawnFunction) in JS platforms,
and the other (spawnFile) doesn't work in Dart/AOT (Flutter). Neither are
able to use transferrable/shared memory objects, and dart:isolate was never
implemented in DDC (dartdevc, the development mode for Dart2 using
JavaScript). There are other inconsistencies as well.
Post by Andrew Skalkin
The plan is to make it incompatible. Why? If the only reason is the
overhead for JS compilation, perhaps it can be improved somehow?
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).

On the other hand, the JS platform has evolved quite a bit since isolates
were created:

* Web workers
* Service workers
* Animation worklets
* ... and other APIs like SharedArrayBuffer

... we'd like to enable our web users to seemingly use these, with as
little overhead as possible, without worrying about whether these same APIs
could be implemented efficiently in the Dart VM.
Post by Andrew Skalkin
Post by 'Kevin Moore' via Dart Misc
Post by John Yendt
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
<https://api.dartlang.org/dev/2.0.0-dev.30.0/dart-html/dart-html-library.html>
and friends are based on. Stay tuned!
--
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 the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Kevin Moore' via Dart Misc
2018-02-24 22:28:02 UTC
Permalink
*deletes email being drafted*

What Matan said. :-)
Post by Matan Lurey
Post by Andrew Skalkin
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.
*Sort of.*
Part of the isolate API has never worked (spawnFunction) in JS platforms,
and the other (spawnFile) doesn't work in Dart/AOT (Flutter). Neither are
able to use transferrable/shared memory objects, and dart:isolate was never
implemented in DDC (dartdevc, the development mode for Dart2 using
JavaScript). There are other inconsistencies as well.
Post by Andrew Skalkin
The plan is to make it incompatible. Why? If the only reason is the
overhead for JS compilation, perhaps it can be improved somehow?
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).
On the other hand, the JS platform has evolved quite a bit since isolates
* Web workers
* Service workers
* Animation worklets
* ... and other APIs like SharedArrayBuffer
... we'd like to enable our web users to seemingly use these, with as
little overhead as possible, without worrying about whether these same APIs
could be implemented efficiently in the Dart VM.
Post by Andrew Skalkin
Post by 'Kevin Moore' via Dart Misc
Post by John Yendt
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
<https://api.dartlang.org/dev/2.0.0-dev.30.0/dart-html/dart-html-library.html>
and friends are based on. Stay tuned!
--
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 the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
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
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Andrew Skalkin
2018-02-24 23:13:44 UTC
Permalink
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?
Post by Matan Lurey
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Kevin Moore' via Dart Misc
2018-02-26 20:23:03 UTC
Permalink
Post by Andrew Skalkin
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?
Post by Matan Lurey
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,
Chrome, Safari, etc don't have Isolates – they have Web Workers, etc.
Post by Andrew Skalkin
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!
Thanks! We care about this area. Love the discussion and interest...
Post by Andrew Skalkin
--
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
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Vasiliy Nerozin
2018-02-24 05:28:27 UTC
Permalink
This is sad... :( We are intensively using this features in our project. I
agree with Frank Rollpin that it is killer feature of Dart to use the same
concurrent code on both server and client side.

We are waiting for shared memory feature for Isolates and support
dart:isolate
<https://api.dartlang.org/dev/dart-isolate/dart-isolate-library.html> to
use the same code on server and client side.

On Saturday, February 24, 2018 at 4:05:53 AM UTC+3, 'Kevin Moore' via Dart
Post by 'Kevin Moore' via Dart Announcements
As part of our work to ship Dart 2 <https://www.dartlang.org/dart-2>, we
are removing support in our *web tools* for dart:mirrors
<https://api.dartlang.org/dev/dart-mirrors/dart-mirrors-library.html> and
dart:isolate
<https://api.dartlang.org/dev/dart-isolate/dart-isolate-library.html>.
You will see this change in dart2js
<https://webdev.dartlang.org/tools/dart2js> and the Dart Dev Compiler
<https://webdev.dartlang.org/tools/dartdevc> in the next few weeks on the Dart
SDK dev channel
<https://www.dartlang.org/install#about-sdk-release-channels-and-version-strings>
.
*Note: the **Dart VM <https://www.dartlang.org/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
<https://developer.mozilla.org/en-US/docs/Web/API/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 <https://en.wikipedia.org/wiki/Tree_shaking>. This
leads to dramatically increased output size and execution time. We
recommend web developers use code generation using tools like
package:build <https://pub.dartlang.org/packages/build> and
package:source_gen <https://pub.dartlang.org/packages/source_gen>. These
are the tools used by AngularDart <https://webdev.dartlang.org/angular>
and package:json_serializable
<https://pub.dartlang.org/packages/json_serializable>.
If you have questions about this change, please post on the Dart
discussion group
<https://groups.google.com/a/dartlang.org/forum/#!forum/misc>.
--
For more news and information, visit https://plus.google.com/+dartlang
To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
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 the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Dmitriy Vasilyev
2018-03-16 07:28:04 UTC
Permalink
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
Post by 'Kevin Moore' via Dart Announcements
As part of our work to ship Dart 2 <https://www.dartlang.org/dart-2>, we
are removing support in our *web tools* for dart:mirrors
<https://api.dartlang.org/dev/dart-mirrors/dart-mirrors-library.html> and
dart:isolate
<https://api.dartlang.org/dev/dart-isolate/dart-isolate-library.html>.
You will see this change in dart2js
<https://webdev.dartlang.org/tools/dart2js> and the Dart Dev Compiler
<https://webdev.dartlang.org/tools/dartdevc> in the next few weeks on the Dart
SDK dev channel
<https://www.dartlang.org/install#about-sdk-release-channels-and-version-strings>
.
*Note: the **Dart VM <https://www.dartlang.org/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
<https://developer.mozilla.org/en-US/docs/Web/API/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 <https://en.wikipedia.org/wiki/Tree_shaking>. This
leads to dramatically increased output size and execution time. We
recommend web developers use code generation using tools like
package:build <https://pub.dartlang.org/packages/build> and
package:source_gen <https://pub.dartlang.org/packages/source_gen>. These
are the tools used by AngularDart <https://webdev.dartlang.org/angular>
and package:json_serializable
<https://pub.dartlang.org/packages/json_serializable>.
If you have questions about this change, please post on the Dart
discussion group
<https://groups.google.com/a/dartlang.org/forum/#!forum/misc>.
--
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+***@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.
Jonathan Rezende
2018-03-16 12:22:06 UTC
Permalink
source_gen.
I was using mirrors too, then reflectable and finally source_gen.
I think it is much better, since you have much more control and generate only what you need.

Atenciosamente,

Jonathan Rezende
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?
As part of our work to ship Dart 2 <https://www.dartlang.org/dart-2>, we are removing support in our web tools for dart:mirrors <https://api.dartlang.org/dev/dart-mirrors/dart-mirrors-library.html> and dart:isolate <https://api.dartlang.org/dev/dart-isolate/dart-isolate-library.html>. You will see this change in dart2js <https://webdev.dartlang.org/tools/dart2js> and the Dart Dev Compiler <https://webdev.dartlang.org/tools/dartdevc> in the next few weeks on the Dart SDK dev channel <https://www.dartlang.org/install#about-sdk-release-channels-and-version-strings>.
Note: the Dart VM <https://www.dartlang.org/dart-vm> will continue to fully support both libraries.
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 <https://developer.mozilla.org/en-US/docs/Web/API/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 <https://en.wikipedia.org/wiki/Tree_shaking>. This leads to dramatically increased output size and execution time. We recommend web developers use code generation using tools like package:build <https://pub.dartlang.org/packages/build> and package:source_gen <https://pub.dartlang.org/packages/source_gen>. These are the tools used by AngularDart <https://webdev.dartlang.org/angular> and package:json_serializable <https://pub.dartlang.org/packages/json_serializable>.
If you have questions about this change, please post on the Dart discussion group <https://groups.google.com/a/dartlang.org/forum/#!forum/misc>.
--
For more news and information, visit https://plus.google.com/+dartlang <https://plus.google.com/+dartlang>
To join the conversation, visit https://groups.google.com/a/dartlang.org/ <https://groups.google.com/a/dartlang.org/>
--
For more ways to connect visit https://www.dartlang.org/community <https://www.dartlang.org/community>
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
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 <https://groups.google.com/a/dartlang.org/d/msgid/misc/e4cccb56-8541-4ee8-b3e0-dcc04f2bdd4c%40dartlang.org?utm_medium=email&utm_source=footer>.
--
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+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/F035188F-A995-41EF-B5BD-C34C6299BAC4%40jode.com.br.
'Erik Ernst' via Dart Misc
2018-03-16 12:40:35 UTC
Permalink
Post by Dmitriy Vasilyev
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?
The package reflectable <https://github.com/dart-lang/reflectable> (which
was also mentioned by Jonathan Rezende) is based on static code generation,
but is very nearly the same thing as 'dart:mirrors'. It uses `String`s
rather than `Symbol`s, and doesn't support a couple of things (e.g.,
reflection on closures), because the required run-time support does not
exist. That package is currently being updated to work in Dart 2 (and also
to fit into a continuous testing setup which has changed a lot). It's a
busy time, but we'll get there. ;)

суббПта, 24 февраля 2018 г., 4:05:53 UTC+3 пПльзПватель 'Kevin Moore' via
Post by Dmitriy Vasilyev
Post by 'Kevin Moore' via Dart Announcements
As part of our work to ship Dart 2 <https://www.dartlang.org/dart-2>, we
are removing support in our *web tools* for dart:mirrors
<https://api.dartlang.org/dev/dart-mirrors/dart-mirrors-library.html>
and dart:isolate
<https://api.dartlang.org/dev/dart-isolate/dart-isolate-library.html>.
You will see this change in dart2js
<https://webdev.dartlang.org/tools/dart2js> and the Dart Dev Compiler
<https://webdev.dartlang.org/tools/dartdevc> in the next few weeks on
the Dart SDK dev channel
<https://www.dartlang.org/install#about-sdk-release-channels-and-version-strings>
.
*Note: the **Dart VM <https://www.dartlang.org/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
<https://developer.mozilla.org/en-US/docs/Web/API/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 <https://en.wikipedia.org/wiki/Tree_shaking>. This
leads to dramatically increased output size and execution time. We
recommend web developers use code generation using tools like
package:build <https://pub.dartlang.org/packages/build> and
package:source_gen <https://pub.dartlang.org/packages/source_gen>. These
are the tools used by AngularDart <https://webdev.dartlang.org/angular>
and package:json_serializable
<https://pub.dartlang.org/packages/json_serializable>.
If you have questions about this change, please post on the Dart
discussion group
<https://groups.google.com/a/dartlang.org/forum/#!forum/misc>.
--
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
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
<https://groups.google.com/a/dartlang.org/d/msgid/misc/e4cccb56-8541-4ee8-b3e0-dcc04f2bdd4c%40dartlang.org?utm_medium=email&utm_source=footer>
.
--
Erik Ernst - Google Danmark ApS
Skt Petri Passage 5, 2 sal, 1165 KÞbenhavn K, Denmark
CVR no. 28866984
--
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+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/CACDCfDQL4wZ0sTXQY1aiFN23Qv6E_7iCUt_n-F%2BZ%3DgenAgqq0w%40mail.gmail.com.
'Kevin Moore' via Dart Announcements
2018-05-14 15:09:59 UTC
Permalink
Follow-up: 2.0.0-dev.55.0 has just been released with dart:isolate APIs
removed.

Two addendum:

1. This change also now allows Web Workers to be used via JS interop. I
will share some follow-up information shortly.
2. In most web apps, you will notice a decrease in JS compiled size –
25-30KB in minified output.
Post by 'Kevin Moore' via Dart Announcements
As part of our work to ship Dart 2 <https://www.dartlang.org/dart-2>, we
are removing support in our *web tools* for dart:mirrors
<https://api.dartlang.org/dev/dart-mirrors/dart-mirrors-library.html> and
dart:isolate
<https://api.dartlang.org/dev/dart-isolate/dart-isolate-library.html>.
You will see this change in dart2js
<https://webdev.dartlang.org/tools/dart2js> and the Dart Dev Compiler
<https://webdev.dartlang.org/tools/dartdevc> in the next few weeks on the Dart
SDK dev channel
<https://www.dartlang.org/install#about-sdk-release-channels-and-version-strings>
.
*Note: the **Dart VM <https://www.dartlang.org/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
<https://developer.mozilla.org/en-US/docs/Web/API/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 <https://en.wikipedia.org/wiki/Tree_shaking>. This
leads to dramatically increased output size and execution time. We
recommend web developers use code generation using tools like
package:build <https://pub.dartlang.org/packages/build> and
package:source_gen <https://pub.dartlang.org/packages/source_gen>. These
are the tools used by AngularDart <https://webdev.dartlang.org/angular>
and package:json_serializable
<https://pub.dartlang.org/packages/json_serializable>.
If you have questions about this change, please post on the Dart
discussion group
<https://groups.google.com/a/dartlang.org/forum/#!forum/misc>.
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Announcements" group.
Visit this group at https://groups.google.com/a/dartlang.org/group/announce/.
--
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 view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/4c1bd621-0668-4fbc-a9f6-9a2d6a9f915e%40dartlang.org.
'Kevin Moore' via Dart Announcements
2018-05-14 15:11:12 UTC
Permalink
My apologies. To be *very* clear, dart:isolate support has been removed
from *dart2js*.


*dart:isolate is still available via the Dart VM for console, server, and
Flutter applications.*
Post by 'Kevin Moore' via Dart Announcements
Follow-up: 2.0.0-dev.55.0 has just been released with dart:isolate APIs
removed.
1. This change also now allows Web Workers to be used via JS interop.
I will share some follow-up information shortly.
2. In most web apps, you will notice a decrease in JS compiled size –
25-30KB in minified output.
Post by 'Kevin Moore' via Dart Announcements
As part of our work to ship Dart 2 <https://www.dartlang.org/dart-2>, we
are removing support in our *web tools* for dart:mirrors
<https://api.dartlang.org/dev/dart-mirrors/dart-mirrors-library.html>
and dart:isolate
<https://api.dartlang.org/dev/dart-isolate/dart-isolate-library.html>.
You will see this change in dart2js
<https://webdev.dartlang.org/tools/dart2js> and the Dart Dev Compiler
<https://webdev.dartlang.org/tools/dartdevc> in the next few weeks on
the Dart SDK dev channel
<https://www.dartlang.org/install#about-sdk-release-channels-and-version-strings>
.
*Note: the **Dart VM <https://www.dartlang.org/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
<https://developer.mozilla.org/en-US/docs/Web/API/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 <https://en.wikipedia.org/wiki/Tree_shaking>. This
leads to dramatically increased output size and execution time. We
recommend web developers use code generation using tools like
package:build <https://pub.dartlang.org/packages/build> and
package:source_gen <https://pub.dartlang.org/packages/source_gen>. These
are the tools used by AngularDart <https://webdev.dartlang.org/angular>
and package:json_serializable
<https://pub.dartlang.org/packages/json_serializable>.
If you have questions about this change, please post on the Dart
discussion group
<https://groups.google.com/a/dartlang.org/forum/#!forum/misc>.
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Announcements" group.
Visit this group at https://groups.google.com/a/dartlang.org/group/announce/.
--
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+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/8ce94737-17cb-4cf4-8105-13bbf2bd4ea8%40dartlang.org.
Loading...