Closed RobertBlackhart closed 9 years ago
Thanks for reporting this! I'll take a look and let you know.
It seems that the analyzer and code_transformers packages aren't playing nice with async/await yet, but for now it's possible to use the async_await
transformer to solve this issue. Just include it in your pubspec.yaml:
dependencies:
redstone_mapper: any
async_await:
git: git@github.com:dart-lang/async_await.git
transformers:
- async_await
- redstone_mapper
Also, you need to include an import to the dart:async
library, in every library that uses async/await:
import 'dart:async';
Let me know if that helps
Thanks for the mention. I did run across that package when compiling my code to js but didn't think to use it to fix the non compiled problem as well.
That does solve the problem, thanks.
On Wed, Dec 24, 2014, 2:57 PM Luiz Henrique Farcic Mineo < notifications@github.com> wrote:
It seems that the analyzer and code_transformers packages aren't playing nice with async/await yet, but for now it's possible to use the async_await transformer to solve this issue. Just include it in your pubspec.yaml:
dependencies: async_await: git: git@github.com:dart-lang/async_await.gittransformers:- async_await- redstone_mapper
Also, you need to include an import to the dart:async library, to every library that uses async/await:
import 'dart:async';
Let me know if that helps
— Reply to this email directly or view it on GitHub https://github.com/luizmineo/redstone.dart/issues/58#issuecomment-68071907 .
Cool! I'm closing this issue for now, but let me know if you find any other problem.
There appears to be an issue when using the client-side transformer and the main() method is declared as async. This is the (minimal) source code needed to produce a problem:
And it produces this stack trace:
Removing the redstone_mapper from the transformers section of the pubspec.yaml file also removes this problem. I took a quick look at what the transformer was trying to do to see if there was something I could quickly fix, but I'm not smart enough to know how. Hopefully given this information a fix wouldn't be too hard for you to implement.