-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Discovered while working on #151146. Blocks fixing #137184, easily the top crasher of the flutter tool.
Repro
- Checkout master (I used fbd6890).
- Open packages/flutter_tools/lib/src/compile.dart. Add
await Future.value()after theserver.stdin.writeln('recompile $mainUri $inputKey');(the line in the link). - Run this test using
dart test test/general.shard/devfs_test.dart --name "DevFS actually starts compile before processing bundle"from the packages/flutter_tools directory.
The test will fail:
andrewkolos-macbookpro:flutter_tools andrewkolos$ dart test test/general.shard/devfs_test.dart --name "DevFS actually starts compile before processing bundle"
Building package executable... (1.8s)
Built test:test.
00:01 +0: DevFS actually starts compile before processing bundle
Expected: a value greater than <3>
Actual: <2>
Which: is not a value greater than <3>
#0 fail (package:matcher/src/expect/expect.dart:149:31)
#1 _expect (package:matcher/src/expect/expect.dart:144:3)
#2 expect (package:matcher/src/expect/expect.dart:56:3)
#3 main.<anonymous closure> (file:///Users/andrewkolos/Documents/GitHub/flutter/packages/flutter_tools/test/general.shard/devfs_test.dart:603:5)
<asynchronous suspension>
#4 testUsingContext.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (file:///Users/andrewkolos/Documents/GitHub/flutter/packages/flutter_tools/test/src/context.dart:151:26)
<asynchronous suspension>
#5 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#6 testUsingContext.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (file:///Users/andrewkolos/Documents/GitHub/flutter/packages/flutter_tools/test/src/context.dart:140:22)
<asynchronous suspension>
line1
line2
line1
line2
00:01 +0 -1: DevFS actually starts compile before processing bundle [E]
Expected: a value greater than <3>
Actual: <2>
Which: is not a value greater than <3>
package:matcher expect
test/general.shard/devfs_test.dart 603:5 main.<fn>
===== asynchronous gap ===========================
test/src/context.dart 151:26 testUsingContext.<fn>.<fn>.<fn>.<fn>.<fn>
===== asynchronous gap ===========================
package:flutter_tools/src/base/context.dart 153:19 AppContext.run.<fn>
===== asynchronous gap ===========================
test/src/context.dart 140:22 testUsingContext.<fn>.<fn>.<fn>.<fn>
To run this test again: /Users/andrewkolos/Documents/GitHub/flutter/bin/cache/dart-sdk/bin/dart test test/general.shard/devfs_test.dart -p vm --plain-name 'DevFS actually starts compile before processing bundle'
00:01 +0 -1: Some tests failed.
Consider enabling the flag chain-stack-traces to receive more detailed exceptions.
For example, 'dart test --chain-stack-traces'.
Looks like this method deferring to the event loop causes a mis-sequencing of events somehow.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team