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

Dart2Wasm async/async*/yield/yield* umbrella issue #55025

Closed
1 of 3 tasks
mkustermann opened this issue Feb 27, 2024 · 6 comments
Closed
1 of 3 tasks

Dart2Wasm async/async*/yield/yield* umbrella issue #55025

mkustermann opened this issue Feb 27, 2024 · 6 comments
Assignees
Labels
area-dart2wasm Issues for the dart2wasm compiler.

Comments

@mkustermann
Copy link
Member

mkustermann commented Feb 27, 2024

There's a number of semantics issues with Dart2Wasm's implementation for async/async*/yield/yield* implementation (mostly async* related I believe). We use this tracking number in approvals & status files.

/cc @osa1

@mkustermann mkustermann added the area-dart2wasm Issues for the dart2wasm compiler. label Feb 27, 2024
@osa1
Copy link
Member

osa1 commented Feb 27, 2024

Current list of tests that are hanging:

  • language/async_star/async_star_await_for_test
  • language/async_star/async_star_cancel_test
  • language/async_star/async_star_invalid_test/03
  • language/async_star/async_star_test
  • language/async_star/cancel_and_throw_in_finally_test
  • language/async_star/cancel_test
  • language/async_star/error_test
  • language/async_star/no_cancel2_test
  • language/async_star/no_cancel_test
  • language/async_star/regression_fisk_test
  • language/async_star/throw_in_catch_test
  • language/async_star/yield_test
  • language/async_star/yieldstar_test

https://dart-review.googlesource.com/c/sdk/+/354621 starts to skip these tests.

@whesse
Copy link
Contributor

whesse commented Feb 27, 2024

Please list all tests skipped by this issue, so it can be found when searching.

@osa1
Copy link
Member

osa1 commented Feb 27, 2024

I started looking into why these fail. It takes time to find the root cause, but most of them involve error handling or cancellation (which I suspect may be relying on error handling). So I think it makes sense to start fixing with #52464.

copybara-service bot pushed a commit that referenced this issue Feb 27, 2024
Those timing out tests cause CI infra issues (purple bots)
on deflaking.

Issue #55025

Change-Id: Ibdc3766e0e482f180c03acc987c3323a3574647c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354621
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
@mkustermann
Copy link
Member Author

After fixing test infra structure to recognize async tests, putting in a workaround for Chrome/V8 bug not reporting rethrow errors, we now have the following failures:

co19/Language/Expressions/Function_Invocation/async_generator_invokation_t04 RuntimeError (expected Pass)
co19/Language/Expressions/Function_Invocation/async_generator_invokation_t08 RuntimeError (expected Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A03_t04 RuntimeError (expected Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A03_t05 RuntimeError (expected Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t12 RuntimeError (expected Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t14 RuntimeError (expected Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t15 RuntimeError (expected Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t16 RuntimeError (expected Pass)
language/async/error_timing_test RuntimeError (expected Pass)
language/async/return_throw_test RuntimeError (expected Pass)
language/async_star/async_star_cancel_test RuntimeError (expected Pass)
language/async_star/cancel_and_throw_in_finally_test RuntimeError (expected Pass)
language/async_star/cancel_test RuntimeError (expected Pass)
language/async_star/regression_fisk_test RuntimeError (expected Pass)
language/async_star/throw_in_catch_test RuntimeError (expected Pass)
language/deferred/redirecting_factory_test RuntimeError (expected Pass)
language/regress/regress23244_test RuntimeError (expected Pass)
lib/async/async_await_sync_completer_test RuntimeError (expected Pass)
lib/async/stream_iterator_test RuntimeError (expected Pass)

are failing on configurations

dart2wasm-linux-chrome

@IchordeDionysos
Copy link

I'm currently running into this issue:

Yield statement in async function: YieldStatement(yield* combinedFolded;) (file:///Users/dennis/develop/flutter/app/lib/domain/use_cases/topics/get_summary_of_topics.dart:78:7)
#0      AsyncCodeGenerator.visitYieldStatement (package:dart2wasm/async.dart:1240)
#1      YieldStatement.accept (package:kernel/ast.dart:10496)
#2      _YieldFinder.recurse (package:dart2wasm/async.dart:43)
#3      _YieldFinder.visitBlock (package:dart2wasm/async.dart:56)
#4      Block.accept (package:kernel/ast.dart:9252)
#5      _YieldFinder.recurse (package:dart2wasm/async.dart:43)
#6      _YieldFinder.visitIfStatement (package:dart2wasm/async.dart:78)
#7      IfStatement.accept (package:kernel/ast.dart:10153)
#8      _YieldFinder.recurse (package:dart2wasm/async.dart:43)
#9      _YieldFinder.visitBlock (package:dart2wasm/async.dart:56)
#10     Block.accept (package:kernel/ast.dart:9252)
#11     _YieldFinder.recurse (package:dart2wasm/async.dart:43)
#12     _YieldFinder.visitBlock (package:dart2wasm/async.dart:56)
#13     Block.accept (package:kernel/ast.dart:9252)
#14     _YieldFinder.recurse (package:dart2wasm/async.dart:43)
#15     _YieldFinder.visitTryCatch (package:dart2wasm/async.dart:116)
#16     TryCatch.accept (package:kernel/ast.dart:10270)
#17     _YieldFinder.recurse (package:dart2wasm/async.dart:43)
#18     _YieldFinder.visitTryFinally (package:dart2wasm/async.dart:105)
#19     TryFinally.accept (package:kernel/ast.dart:10432)
#20     _YieldFinder.recurse (package:dart2wasm/async.dart:43)
#21     _YieldFinder.visitBlock (package:dart2wasm/async.dart:56)
#22     Block.accept (package:kernel/ast.dart:9252)
#23     _YieldFinder.recurse (package:dart2wasm/async.dart:43)
#24     _YieldFinder.visitBlock (package:dart2wasm/async.dart:56)
#25     Block.accept (package:kernel/ast.dart:9252)
#26     _YieldFinder.recurse (package:dart2wasm/async.dart:43)
#27     _YieldFinder.find (package:dart2wasm/async.dart:32)
#28     AsyncCodeGenerator._generateBodies (package:dart2wasm/async.dart:557)
#29     AsyncCodeGenerator.generateLambda (package:dart2wasm/async.dart:551)
#30     Translator.translate (package:dart2wasm/translator.dart:382)
#31     compileToModule (package:dart2wasm/compile.dart:151)
<asynchronous suspension>
#32     generateWasm (package:dart2wasm/generate_wasm.dart:21)

Example code:

Stream<String> call() async* {
  yield* combinedFolded; // errors here
}

Should this now be fixed, or should I open a new issue?

Version:

Flutter 3.20.0-11.0.pre.16 • channel [user-branch] • https://github.com/simpleclub-extended/flutter.git
Framework • revision 22cc113d16 (7 weeks ago) • 2024-02-17 23:46:10 +0000
Engine • revision e51d4f1e28
Tools • Dart 3.4.0 (build 3.4.0-153.0.dev) • DevTools 2.33.0-dev.6

@kevmoo
Copy link
Member

kevmoo commented Apr 6, 2024

@IchordeDionysos – please open a seperate issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart2wasm Issues for the dart2wasm compiler.
Projects
None yet
Development

No branches or pull requests

5 participants