anchor.diff:  import 'package:analyzer/src/dart/analysis/session.dart';
   import 'package:analyzer/src/dart/sdk/sdk.dart';
   import 'package:analyzer/src/generated/engine.dart';
  -import 'package:analyzer/src/generated/sdk.dart';
   import 'package:analyzer/src/generated/source.dart';
   import 'package:analyzer/src/summary/format.dart';
   import 'package:analyzer/src/summary/summarize_elements.dart';
  
positive.code: // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
  // for details. All rights reserved. Use of this source code is governed by a
  // BSD-style license that can be found in the LICENSE file.
  
  import 'dart:collection';
  
  import 'package:_fe_analyzer_shared/src/sdk/allowed_experiments.dart';
  import 'package:analyzer/dart/analysis/features.dart';
  
negative.code: import 'package:analyzer/src/summary2/linked_element_factory.dart' as summary2;
  import 'package:analyzer/src/summary2/reference.dart' as summary2;
  import 'package:meta/meta.dart';
  import 'package:yaml/yaml.dart';
  
  /// Build summary for SDK the at the given [sdkPath].
  ///
  /// If [embedderYamlPath] is provided, then libraries from this file are
  /// appended to the libraries of the specified SDK.
  List<int> buildSdkSummary({
    @required ResourceProvider resourceProvider,
    @required String sdkPath,
    String embedderYamlPath,
  }) {
    var sdk = FolderBasedDartSdk(
      resourceProvider,
      resourceProvider.getFolder(sdkPath),
    );
    sdk.useSummary = false;
    sdk.analysisOptions = AnalysisOptionsImpl();
  
    // Append libraries from the embedder.
    if (embedderYamlPath != null) {
      var file = resourceProvider.getFile(embedderYamlPath);
      var content = file.readAsStringSync();
      var map = loadYaml(content) as YamlMap;
      var embedderSdk = EmbedderSdk(resourceProvider, {file.parent: map});
      for (var library in embedderSdk.sdkLibraries) {
        var uriStr = library.shortName;
        if (sdk.libraryMap.getLibrary(uriStr) == null) {
          sdk.libraryMap.setLibrary(uriStr, library);
        }
      }
    }
  
    var librarySources = sdk.sdkLibraries.map((e) {
      return sdk.mapDartUri(e.shortName);
    }).toList();
  
    return _Builder(
      sdk.context,
      sdk.allowedExperimentsJson,
      librarySources,
    ).build();
  }
  