Skip to content
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

DDC async* bug #39994

Closed
vsmenon opened this issue Jan 6, 2020 · 10 comments
Closed

DDC async* bug #39994

vsmenon opened this issue Jan 6, 2020 · 10 comments
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. P2 A bug or feature request we're likely to work on web-dev-compiler

Comments

@vsmenon
Copy link
Member

vsmenon commented Jan 6, 2020

The following test prints:

Hello, World!
Hello, World!
Hello, World!
[hello]

in the VM and dart2js, but prints nothing DDC.

import 'dart:async';

  Stream<String> testStream(String test) async* {
    try {
      await testFunction();
      yield test;
    } catch (e) {
      yield test;
      print('Hello, World!');
      print('Hello, World!');
      print('Hello, World!');
    }
  }

  Future<String> testFunction() async {
    await testFunctio2();
    return "";
  }

  Future<String> testFunctio2() async {
    throw Exception("test");
  }

void main() async {
  var stream = testStream("hello");
  print(await stream.toList());
}
@vsmenon vsmenon added P2 A bug or feature request we're likely to work on web-dev-compiler area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels Jan 6, 2020
@vsmenon
Copy link
Member Author

vsmenon commented Jan 6, 2020

@Markzipan - can you take a look when you get a chance?

@Onein
Copy link

Onein commented Feb 4, 2020

Any update on this, since the original issue in the flutter repo is already closed?

@Markzipan
Copy link
Contributor

I haven't had the time to look at this yet, but this issue is still reproducible on DDC. We could escalate if it's blocking.

@Onein
Copy link

Onein commented Feb 6, 2020

Thanks for the response. No, it's not blocking I just wanted to know if there is any progress because the original issue is closed now. It's just an annoying bug, because you can't really use the ddc in case you work a lot with streams, like I do.

@phamnhuvu-dev
Copy link

This bug is very critical when all our business logic is using stream then it is not working on the web platform

@Markzipan
Copy link
Contributor

We have a fix in the works for this issue that's been toiling behind other priorities. I've revived the fix, so this issue may be resolved soon.

@phamnhuvu-dev
Copy link

phamnhuvu-dev commented Apr 9, 2020

@Markzipan But when I run the web with the release option, the problem is gone.

@Markzipan
Copy link
Contributor

The debug and release compilers are different on the web; this issue only exists for the debug compiler. We plan on resolving async disparities between our various backends soon (tm).

@vari
Copy link

vari commented May 29, 2020

Is there any update on the fix for this issue?

@Markzipan
Copy link
Contributor

I have a patch for this issue in the works, but it's dredged up a couple other timing-related code issues. I'll try to get the patch in and work on a more holistic fix later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. P2 A bug or feature request we're likely to work on web-dev-compiler
Projects
None yet
Development

No branches or pull requests

5 participants