exactLibraries method

Stream<ModuleLibrary> exactLibraries(
  1. AssetReader reader
)

Implementation

Stream<ModuleLibrary> exactLibraries(AssetReader reader) async* {
  for (var module in unsupportedModules) {
    for (var source in module.sources) {
      var libraryId = source.changeExtension(moduleLibraryExtension);
      ModuleLibrary library;
      if (await reader.canRead(libraryId)) {
        library = ModuleLibrary.deserialize(
            libraryId, await reader.readAsString(libraryId));
      } else {
        // A missing .module.library file indicates a part file, which can't
        // have import statements, so we just skip them.
        continue;
      }
      if (library.sdkDeps
          .any((lib) => !module.platform.supportsLibrary(lib))) {
        yield library;
      }
    }
  }
}