Skip to content

Commit 8cf2161

Browse files
authored
Modify stepping integration test to accommodate new DDC async semantics. (flutter#152204)
Updates the expected steps in the async function defined within `stepping_project.dart`. The Dart web team is updating the async semantics of DDC to bring them in line with the other backends. Currently, the DDC async semantics don't adhere to the Dart spec and this can lead to inconsistent and surprising results. However, the step-over operation doesn't work well yet with the new DDC async semantics. In the long run we intend to improve this but until then the debug stepper will have sporadic results that we can't model well with this test. When we are able to fix the stepper functionality, we will return this test to cover more of the async function being stepped over.
1 parent 0936b24 commit 8cf2161

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/flutter_tools/test/integration.shard/test_data/stepping_project.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ class WebSteppingProject extends Project {
9494
Future<void> doAsyncStuff() async {
9595
print("test"); // BREAKPOINT
9696
await Future.value(true); // STEP 1
97-
await Future.microtask(() => true); // STEP 2
98-
await Future.delayed(const Duration(milliseconds: 1)); // STEP 3
99-
print("done!"); // STEP 4
100-
} // STEP 5
97+
await Future.microtask(() => true);
98+
await Future.delayed(const Duration(milliseconds: 1));
99+
print("done!");
100+
}
101101
102102
@override
103103
Widget build(BuildContext context) {
@@ -113,5 +113,5 @@ class WebSteppingProject extends Project {
113113
int get breakpointLine => lineContaining(main, '// BREAKPOINT');
114114
int lineForStep(int i) => lineContaining(main, '// STEP $i');
115115

116-
final int numberOfSteps = 5;
116+
final int numberOfSteps = 1;
117117
}

0 commit comments

Comments
 (0)