build
build copied to clipboard
Race condition initializing AnalyzerResolvers
When using build_runner
there is only ever a single instance of AnalyzerResolvers
, however when using build_test
there can be multiple instances constructed. Potentially indifferent isolates.
During initialization this class touches the filesystem and initializing more than one has race conditions deleting a file.
FileSystemException: Cannot delete file, path = '.dart_tool/build_resolvers/sdk.sum.deps' (OS Error: No such file or directory, errno = 2)
dart:io FileSystemEntity.delete
package:build_resolvers/src/resolver.dart 374:22 _defaultSdkSummaryGenerator
https://github.com/dart-lang/build/blob/cc629116eef498015d9991bc8760f0b3e73f03e3/build_resolvers/lib/src/resolver.dart#L372-L374