mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 13:08:01 +00:00
Deprecate buildSdkSummary2(), use buildSdkSummary() instead.
Change-Id: Iaceb38251047ba4d2cb3e051c096f148b810fbb9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265407 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
e46bade3d0
commit
afb9609261
|
@ -11,6 +11,7 @@
|
|||
* Deprecated `LibraryElement.parts2`, use `parts` instead.
|
||||
* Deprecated `ImportElement.imports2`, use `imports` instead.
|
||||
* Add `AnalysisDriverForPackageBuild.sdkLibraryUris`.
|
||||
* Deprecated `buildSdkSummary2()`, use `buildSdkSummary()` instead.
|
||||
|
||||
## 5.1.0
|
||||
* Deprecated `AstNode.name2`, use `name` instead.
|
||||
|
|
|
@ -19,7 +19,7 @@ import 'package:yaml/yaml.dart';
|
|||
///
|
||||
/// If [embedderYamlPath] is provided, then libraries from this file are
|
||||
/// appended to the libraries of the specified SDK.
|
||||
Future<Uint8List> buildSdkSummary2({
|
||||
Future<Uint8List> buildSdkSummary({
|
||||
required ResourceProvider resourceProvider,
|
||||
required String sdkPath,
|
||||
String? embedderYamlPath,
|
||||
|
@ -72,3 +72,19 @@ Future<Uint8List> buildSdkSummary2({
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Build summary for SDK at the given [sdkPath].
|
||||
///
|
||||
/// If [embedderYamlPath] is provided, then libraries from this file are
|
||||
/// appended to the libraries of the specified SDK.
|
||||
@Deprecated('Use buildSdkSummary() instead')
|
||||
Future<Uint8List> buildSdkSummary2({
|
||||
required ResourceProvider resourceProvider,
|
||||
required String sdkPath,
|
||||
String? embedderYamlPath,
|
||||
}) async {
|
||||
return buildSdkSummary(
|
||||
resourceProvider: resourceProvider,
|
||||
sdkPath: sdkPath,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -142,3 +142,13 @@ transforms:
|
|||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'isAccessibleIn'
|
||||
|
||||
# buildSdkSummary()
|
||||
- title: "Replace with get buildSdkSummary()"
|
||||
date: 2022-10-24
|
||||
element:
|
||||
function: 'buildSdkSummary2'
|
||||
uris: [ 'package:analyzer/dart/sdk/build_sdk_summary.dart' ]
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'buildSdkSummary'
|
||||
|
|
|
@ -51,7 +51,7 @@ embedded_libs:
|
|||
"dart:ui": "ui/ui.dart"
|
||||
''');
|
||||
|
||||
final sdkSummaryBytes = await buildSdkSummary2(
|
||||
final sdkSummaryBytes = await buildSdkSummary(
|
||||
resourceProvider: resourceProvider,
|
||||
sdkPath: sdkRoot.path,
|
||||
embedderYamlPath: embedderFile.path,
|
||||
|
@ -100,7 +100,7 @@ embedded_libs:
|
|||
root: sdkRoot,
|
||||
);
|
||||
|
||||
final sdkSummaryBytes = await buildSdkSummary2(
|
||||
final sdkSummaryBytes = await buildSdkSummary(
|
||||
resourceProvider: resourceProvider,
|
||||
sdkPath: sdkRoot.path,
|
||||
);
|
||||
|
|
|
@ -25,7 +25,7 @@ class AnalysisDriverForPackageBuildTest with ResourceProviderMixin {
|
|||
root: sdkRoot,
|
||||
);
|
||||
|
||||
var sdkSummaryBytes = await buildSdkSummary2(
|
||||
var sdkSummaryBytes = await buildSdkSummary(
|
||||
resourceProvider: resourceProvider,
|
||||
sdkPath: sdkRoot.path,
|
||||
);
|
||||
|
|
|
@ -416,7 +416,7 @@ class PubPackageResolutionTest extends ContextResolutionTest {
|
|||
|
||||
Future<File> writeSdkSummary() async {
|
||||
final file = getFile('/home/summaries/sdk.sum');
|
||||
final bytes = await buildSdkSummary2(
|
||||
final bytes = await buildSdkSummary(
|
||||
resourceProvider: resourceProvider,
|
||||
sdkPath: sdkRoot.path,
|
||||
);
|
||||
|
|
|
@ -52,7 +52,7 @@ const binaryName = "build_sdk_summaries";
|
|||
Future<void> _buildSummary(String sdkPath, String outPath) async {
|
||||
print('Generating summary.');
|
||||
Stopwatch sw = Stopwatch()..start();
|
||||
List<int> bytes = await buildSdkSummary2(
|
||||
List<int> bytes = await buildSdkSummary(
|
||||
resourceProvider: PhysicalResourceProvider.INSTANCE,
|
||||
sdkPath: sdkPath,
|
||||
);
|
||||
|
|
|
@ -127,7 +127,7 @@ class Driver implements CommandLineStarter {
|
|||
final stopwatch = Stopwatch()..start();
|
||||
|
||||
for (var i = 0; i < 3; i++) {
|
||||
await buildSdkSummary2(
|
||||
await buildSdkSummary(
|
||||
resourceProvider: PhysicalResourceProvider.INSTANCE,
|
||||
sdkPath: options.dartSdkPath!,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue