From 98befcf28115518df7efbba1d9a32039f59178bc Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 6 Jan 2025 14:54:35 -0800 Subject: [PATCH] [pkg] rev packages to have a min sdk verison of at least 3.0 Change-Id: I365abf095f0801bb8ce864f3bbaa57ff298164c3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402881 Reviewed-by: Nate Bosch Commit-Queue: Devon Carew --- pkg/analysis_server_client/pubspec.yaml | 2 +- pkg/build_integration/pubspec.yaml | 2 +- .../test/file_system/multi_root_test.dart | 7 +++-- .../lib/dds_service_extensions.dart | 27 +++++++------------ pkg/dds_service_extensions/pubspec.yaml | 2 +- pkg/js_runtime/pubspec.yaml | 2 +- pkg/js_shared/pubspec.yaml | 2 +- pkg/telemetry/lib/src/pii_regexp.dart | 2 +- pkg/telemetry/pubspec.yaml | 2 +- pkg/vm_snapshot_analysis/lib/ascii_table.dart | 2 -- .../lib/instruction_sizes.dart | 2 +- pkg/vm_snapshot_analysis/lib/name.dart | 2 +- .../lib/precompiler_trace.dart | 2 +- .../lib/program_info.dart | 5 ++-- .../lib/src/commands/compare.dart | 2 +- .../lib/src/commands/explain.dart | 2 +- .../lib/src/commands/summary.dart | 2 +- .../lib/src/commands/treemap.dart | 2 +- .../lib/src/dominators.dart | 2 +- pkg/vm_snapshot_analysis/lib/treemap.dart | 2 +- pkg/vm_snapshot_analysis/lib/utils.dart | 1 - pkg/vm_snapshot_analysis/lib/v8_profile.dart | 2 +- pkg/vm_snapshot_analysis/pubspec.yaml | 2 +- third_party/pkg/dap/pubspec.yaml | 2 +- .../pkg/language_server_protocol/pubspec.yaml | 2 +- 25 files changed, 34 insertions(+), 48 deletions(-) diff --git a/pkg/analysis_server_client/pubspec.yaml b/pkg/analysis_server_client/pubspec.yaml index 490bf386ffc..1f7d5d5397c 100644 --- a/pkg/analysis_server_client/pubspec.yaml +++ b/pkg/analysis_server_client/pubspec.yaml @@ -10,7 +10,7 @@ repository: https://github.com/dart-lang/sdk/tree/main/pkg/analysis_server_clien publish_to: none environment: - sdk: '>=2.19.0 <3.0.0' + sdk: ^3.0.0 # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/build_integration/pubspec.yaml b/pkg/build_integration/pubspec.yaml index 7045b181ea2..cd5c53d6a3a 100644 --- a/pkg/build_integration/pubspec.yaml +++ b/pkg/build_integration/pubspec.yaml @@ -6,7 +6,7 @@ description: > publish_to: none environment: - sdk: '>=2.12.0 <3.0.0' + sdk: ^3.0.0 # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/build_integration/test/file_system/multi_root_test.dart b/pkg/build_integration/test/file_system/multi_root_test.dart index 9d6b5a00027..3c566193de1 100644 --- a/pkg/build_integration/test/file_system/multi_root_test.dart +++ b/pkg/build_integration/test/file_system/multi_root_test.dart @@ -2,9 +2,7 @@ // 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. -// ignore_for_file: implementation_imports - -library front_end.test.src.multi_root_file_system.dart; +// ignore_for_file: implementation_import import 'dart:async'; @@ -41,7 +39,8 @@ main() { setUp(() { memoryFs = MemoryFileSystem(root); - final rootUris = ['r1', 'r2/', 'A/B/', ''].map((r) => root.resolve(r)).toList(); + final rootUris = + ['r1', 'r2/', 'A/B/', ''].map((r) => root.resolve(r)).toList(); multiRoot = MultiRootFileSystem('multi-root', rootUris, memoryFs); }); diff --git a/pkg/dds_service_extensions/lib/dds_service_extensions.dart b/pkg/dds_service_extensions/lib/dds_service_extensions.dart index edada8ddf69..799f1cf6659 100644 --- a/pkg/dds_service_extensions/lib/dds_service_extensions.dart +++ b/pkg/dds_service_extensions/lib/dds_service_extensions.dart @@ -429,24 +429,15 @@ class CachedCpuSamples extends CpuSamples { CachedCpuSamples({ required this.userTag, this.truncated, - required int? samplePeriod, - required int? maxStackDepth, - required int? sampleCount, - required int? timeOriginMicros, - required int? timeExtentMicros, - required int? pid, - required List? functions, - required List? samples, - }) : super( - samplePeriod: samplePeriod, - maxStackDepth: maxStackDepth, - sampleCount: sampleCount, - timeOriginMicros: timeOriginMicros, - timeExtentMicros: timeExtentMicros, - pid: pid, - functions: functions, - samples: samples, - ); + required super.samplePeriod, + required super.maxStackDepth, + required super.sampleCount, + required super.timeOriginMicros, + required super.timeExtentMicros, + required super.pid, + required super.functions, + required super.samples, + }); CachedCpuSamples._fromJson(Map json) : userTag = json['userTag']!, diff --git a/pkg/dds_service_extensions/pubspec.yaml b/pkg/dds_service_extensions/pubspec.yaml index e9e3ff3254a..7653510c0f2 100644 --- a/pkg/dds_service_extensions/pubspec.yaml +++ b/pkg/dds_service_extensions/pubspec.yaml @@ -6,7 +6,7 @@ description: >- repository: https://github.com/dart-lang/sdk/tree/main/pkg/dds_service_extensions environment: - sdk: '>=2.15.0 <4.0.0' + sdk: ^3.0.0 dependencies: async: ^2.4.1 diff --git a/pkg/js_runtime/pubspec.yaml b/pkg/js_runtime/pubspec.yaml index 5ea7a56a85f..2b25fa3afe0 100644 --- a/pkg/js_runtime/pubspec.yaml +++ b/pkg/js_runtime/pubspec.yaml @@ -3,7 +3,7 @@ name: js_runtime publish_to: none environment: - sdk: '>=2.19.0 <3.0.0' + sdk: ^3.0.0 # Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: diff --git a/pkg/js_shared/pubspec.yaml b/pkg/js_shared/pubspec.yaml index 51f89bc6fdd..43fe85eef32 100644 --- a/pkg/js_shared/pubspec.yaml +++ b/pkg/js_shared/pubspec.yaml @@ -3,7 +3,7 @@ name: js_shared publish_to: none environment: - sdk: '>=2.19.0 <3.0.0' + sdk: ^3.0.0 # Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: diff --git a/pkg/telemetry/lib/src/pii_regexp.dart b/pkg/telemetry/lib/src/pii_regexp.dart index 7c189455cd6..d6691f5cc20 100644 --- a/pkg/telemetry/lib/src/pii_regexp.dart +++ b/pkg/telemetry/lib/src/pii_regexp.dart @@ -8,7 +8,7 @@ /// intentionally broad to make sure they get everything, possibly at the /// expense of readability for the error message. Use care when reducing /// their scope. -library pii_regexp; +library; /// Contain an ordered list of regular expressions to be applied in sequence /// with [applyTo] to a string, with any matches being substituted with diff --git a/pkg/telemetry/pubspec.yaml b/pkg/telemetry/pubspec.yaml index cf06cde2e2a..757d044402b 100644 --- a/pkg/telemetry/pubspec.yaml +++ b/pkg/telemetry/pubspec.yaml @@ -4,7 +4,7 @@ description: A library to facilitate reporting analytics and crash reports. publish_to: none environment: - sdk: '>=2.12.0 <3.0.0' + sdk: ^3.0.0 # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/vm_snapshot_analysis/lib/ascii_table.dart b/pkg/vm_snapshot_analysis/lib/ascii_table.dart index 39455d8e6b0..4e2af3b47d2 100644 --- a/pkg/vm_snapshot_analysis/lib/ascii_table.dart +++ b/pkg/vm_snapshot_analysis/lib/ascii_table.dart @@ -2,8 +2,6 @@ // 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. -library vm_snapshot_analysis.ascii_table; - import 'dart:math' as math; /// A row in the [AsciiTable]. diff --git a/pkg/vm_snapshot_analysis/lib/instruction_sizes.dart b/pkg/vm_snapshot_analysis/lib/instruction_sizes.dart index a1db07f09d4..a1d369d24b0 100644 --- a/pkg/vm_snapshot_analysis/lib/instruction_sizes.dart +++ b/pkg/vm_snapshot_analysis/lib/instruction_sizes.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Helper functions for parsing output of `--print-instructions-sizes-to` flag. -library vm_snapshot_analysis.instruction_sizes; +library; import 'package:vm_snapshot_analysis/name.dart'; import 'package:vm_snapshot_analysis/program_info.dart'; diff --git a/pkg/vm_snapshot_analysis/lib/name.dart b/pkg/vm_snapshot_analysis/lib/name.dart index 5d4e569d84b..d85898f3cfc 100644 --- a/pkg/vm_snapshot_analysis/lib/name.dart +++ b/pkg/vm_snapshot_analysis/lib/name.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Helpers for parsing Code object name produced by Code::QualifiedName -library vm_snapshot_analysis.name; +library; // Wrapper around the name of a Code object produced by Code::QualifiedName. // diff --git a/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart b/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart index 49fe92864c7..b9cd7e5264d 100644 --- a/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart +++ b/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Helpers for working with the output of `--trace-precompiler-to` VM flag. -library vm_snapshot_analysis.precompiler_trace; +library; import 'package:vm_snapshot_analysis/name.dart'; import 'package:vm_snapshot_analysis/program_info.dart'; diff --git a/pkg/vm_snapshot_analysis/lib/program_info.dart b/pkg/vm_snapshot_analysis/lib/program_info.dart index bbffd0f00e8..40f993efc93 100644 --- a/pkg/vm_snapshot_analysis/lib/program_info.dart +++ b/pkg/vm_snapshot_analysis/lib/program_info.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Classes for representing information about the program structure. -library vm_snapshot_analysis.program_info; +library; import 'package:vm_snapshot_analysis/v8_profile.dart'; @@ -379,8 +379,7 @@ abstract class Bucketing extends BucketInfo { /// [cls] and function name [fun]. String bucketFor(String? pkg, String lib, String? cls, String? fun); - const Bucketing({required List nameComponents}) - : super(nameComponents: nameComponents); + const Bucketing({required super.nameComponents}); static const _forType = { HistogramType.bySymbol: _BucketBySymbol(), diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/compare.dart b/pkg/vm_snapshot_analysis/lib/src/commands/compare.dart index d0d9aac10eb..f6027fe6a82 100644 --- a/pkg/vm_snapshot_analysis/lib/src/commands/compare.dart +++ b/pkg/vm_snapshot_analysis/lib/src/commands/compare.dart @@ -5,7 +5,7 @@ /// This tool compares two JSON size reports produced by /// --print-instructions-sizes-to and reports which symbols increased in size /// and which symbols decreased in size. -library vm_snapshot_analysis.compare; +library; import 'dart:io'; diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart b/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart index 130e34b4766..cbd387e1fac 100644 --- a/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart +++ b/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart @@ -4,7 +4,7 @@ /// This command allows to inspect information written into the /// precompiler trace (`--trace-precompiler-to` output). -library vm_snapshot_analysis.explain; +library; import 'dart:async'; import 'dart:io'; diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart b/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart index 3709c826281..3816f340ddf 100644 --- a/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart +++ b/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart @@ -5,7 +5,7 @@ /// This tool generates a summary report from a binary size reports produced by /// the AOT compiler's --print-instructions-sizes-to and /// --write-v8-snapshot-profile-to flags. -library vm_snapshot_analysis.summary; +library; import 'dart:async'; import 'dart:io'; diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/treemap.dart b/pkg/vm_snapshot_analysis/lib/src/commands/treemap.dart index d68c8a5c9ef..95b3dbac583 100644 --- a/pkg/vm_snapshot_analysis/lib/src/commands/treemap.dart +++ b/pkg/vm_snapshot_analysis/lib/src/commands/treemap.dart @@ -8,7 +8,7 @@ /// /// It used the same visualization framework as Chromium's binary_size tool /// located in third_party/binary_size. -library vm_snapshot_analysis.commands.treemap; +library; import 'dart:async'; import 'dart:convert'; diff --git a/pkg/vm_snapshot_analysis/lib/src/dominators.dart b/pkg/vm_snapshot_analysis/lib/src/dominators.dart index 9a0444bc62f..f1c06fa8b9e 100644 --- a/pkg/vm_snapshot_analysis/lib/src/dominators.dart +++ b/pkg/vm_snapshot_analysis/lib/src/dominators.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Utility methods for computing dominators of an arbitrary graph. -library vm_snapshot_analysis.src.dominators; +library; import 'dart:math' as math; diff --git a/pkg/vm_snapshot_analysis/lib/treemap.dart b/pkg/vm_snapshot_analysis/lib/treemap.dart index 3c4458a2185..45199659475 100644 --- a/pkg/vm_snapshot_analysis/lib/treemap.dart +++ b/pkg/vm_snapshot_analysis/lib/treemap.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Helper for building a treemap out of AOT snapshot size dump. -library vm_snapshot_analysis.treemap; +library; import 'dart:math'; diff --git a/pkg/vm_snapshot_analysis/lib/utils.dart b/pkg/vm_snapshot_analysis/lib/utils.dart index d722bb27cd2..d2df0ea644f 100644 --- a/pkg/vm_snapshot_analysis/lib/utils.dart +++ b/pkg/vm_snapshot_analysis/lib/utils.dart @@ -1,7 +1,6 @@ // Copyright (c) 2020, 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. -library vm_snapshot_analysis.utils; import 'package:vm_snapshot_analysis/ascii_table.dart'; import 'package:vm_snapshot_analysis/instruction_sizes.dart' diff --git a/pkg/vm_snapshot_analysis/lib/v8_profile.dart b/pkg/vm_snapshot_analysis/lib/v8_profile.dart index 6bcf9029ec4..4996e6153cf 100644 --- a/pkg/vm_snapshot_analysis/lib/v8_profile.dart +++ b/pkg/vm_snapshot_analysis/lib/v8_profile.dart @@ -4,7 +4,7 @@ /// This library contains utilities for reading and analyzing snapshot profiles /// produced by `--write-v8-snapshot-profile-to` VM flag. -library vm_snapshot_analysis.v8_profile; +library; import 'package:collection/collection.dart'; import 'package:vm_snapshot_analysis/name.dart'; diff --git a/pkg/vm_snapshot_analysis/pubspec.yaml b/pkg/vm_snapshot_analysis/pubspec.yaml index 6365f3788ac..229f7eae581 100644 --- a/pkg/vm_snapshot_analysis/pubspec.yaml +++ b/pkg/vm_snapshot_analysis/pubspec.yaml @@ -4,7 +4,7 @@ description: Utilities for analysing AOT snapshot size. repository: https://github.com/dart-lang/sdk/tree/main/pkg/vm_snapshot_analysis environment: - sdk: '>=2.14.0 <3.0.0' + sdk: ^3.0.0 executables: snapshot_analysis: analyse diff --git a/third_party/pkg/dap/pubspec.yaml b/third_party/pkg/dap/pubspec.yaml index 94a34f0e285..97b1febb2db 100644 --- a/third_party/pkg/dap/pubspec.yaml +++ b/third_party/pkg/dap/pubspec.yaml @@ -6,7 +6,7 @@ description: >- repository: https://github.com/dart-lang/sdk/tree/main/third_party/pkg/dap environment: - sdk: '>=2.19.0 <4.0.0' + sdk: ^3.0.0 # We use 'any' version constraints here as we get our package versions from # the dart-lang/sdk repo's DEPS file. Note that this is a special case; the diff --git a/third_party/pkg/language_server_protocol/pubspec.yaml b/third_party/pkg/language_server_protocol/pubspec.yaml index 13843f2628b..968040d1732 100644 --- a/third_party/pkg/language_server_protocol/pubspec.yaml +++ b/third_party/pkg/language_server_protocol/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/dart-lang/sdk/tree/main/third_party/pkg/language_ publish_to: none environment: - sdk: '>=3.0.0 <4.0.0' + sdk: ^3.0.0 # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: