Repository navigation
Say when Flutwire may be missing calls - #9
Merged
Merged
Conversation
A client that does not use dart:io, an adapter running in another isolate and an HttpOverrides.global set over the capture all leave calls out of the list with no sign that anything is missing. The engine now keeps a note for each: it watches the calls an adapter stood down for, checks whether the capture is still installed, and listens on a named port for adapters that run in an isolate with no recorder.
The line opens a sheet that names each cause and says what to change, in English and Italian. A replaced capture is a state every check finds again, so its note does not count calls.
When the Dio interceptor or the http client stands down for the capture and the capture does not record the call, they tell the engine which client it was, so the inspector can name it.
The example gets a Blind spots section: a call from another isolate, a client that does not use dart:io, and a capture that can be replaced and restored. The README, the package pages and the changelog describe the line.
|
This pull request adds no capability the code did not already have. 44 files read · 5087 ms · against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A call can be missing from the list without any sign. A client that does not use
dart:io, an adapter that runs in another isolate and anHttpOverrides.globalset over the capture each leave calls out silently. This adds a line above the list that says so, names the cause and says what to change.It notices three things, and only after it has seen one happen:
dart:io. The Dio interceptor and the http client stand down for the capture, so when the capture never saw a call they stood down for, the client is named with the host it called.dart:iocall in another isolate stays out of reach, because no Flutwire code runs there.HttpOverrides.currentis still Flutwire's, or that a newHttpClientis still one of its clients, when it opens and whenever an adapter's call went unseen.The line says "may be missing" and the sheet names what Flutwire saw, because it cannot know a call was lost. A replaced capture is a state that each check finds again, so its note shows no count.
New public API:
Flutwire.coverage,Flutwire.watchStandDownfor adapter authors,FlutwireGap,FlutwireCoverageNoteandFlutwireStandDown.FlutwireSessiongainscoverage.I tried all three cases on an Android emulator with the example app, which has a new Blind spots section with a probe for each, and built the example for the web. The Italian strings are under test. All four suites pass and
flutter analyze --fatal-infosis clean.Targets
0.2.0, Tier 2, M24.