Repository navigation
Add a timeout option to the scanner wrapper - #78
Merged
Merged
Conversation
A hung scanner no longer blocks the caller when it passes a `timeout`. The wrapper also closes the scanner's stdin, and its errors name only the subcommand instead of the full command line, which can list hundreds of package roots.
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.
Why
expo-modules-autolinkingrunsscanModuleson every iOS build to find@ExpoModuleclasses (expo/expo#49784). The wrapper has no timeout, so a hung scanner blocks the build phase. Its error message also contains the full command line, which in an app lists every package root (about 90 paths inbare-expo).How
scanModulesandscanExportstake atimeoutin milliseconds. When it's exceeded, the scanner is killed and the call rejects with aScannerErrorthat says so. There is no limit by default.ScannerErrormessages name only the binary and the subcommand, for example`ExpoModulesMacros scan-modules` failed: ….Test Plan
npm run typecheckpasses.timeout: 500; a binary that exits 3 rejects with`fail scan-modules` failed: boom; a binary that reads stdin to the end returns its report in 162 ms without a timeout.apple/ExpoModulesMacroswithtimeout: 30000reportsHapticsModuleforexpo-haptics.