Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Revert "Bump lower Dart SDK constraints to 3.0" #40317

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 54 additions & 27 deletions ci/bin/format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,19 @@ abstract class FormatChecker {
/// Checks and formats C++/ObjC/Shader files using clang-format.
class ClangFormatChecker extends FormatChecker {
ClangFormatChecker({
super.processManager,
required super.baseGitRef,
required super.repoDir,
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
required Directory repoDir,
required Directory srcDir,
super.allFiles,
super.messageCallback,
bool allFiles = false,
MessageCallback? messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
) {
/*late*/ String clangOs;
if (Platform.isLinux) {
Expand Down Expand Up @@ -444,14 +449,19 @@ class ClangFormatChecker extends FormatChecker {
/// Checks the format of Java files uing the Google Java format checker.
class JavaFormatChecker extends FormatChecker {
JavaFormatChecker({
super.processManager,
required super.baseGitRef,
required super.repoDir,
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
required Directory repoDir,
required Directory srcDir,
super.allFiles,
super.messageCallback,
bool allFiles = false,
MessageCallback? messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
) {
googleJavaFormatJar = File(
path.absolute(
Expand Down Expand Up @@ -586,14 +596,19 @@ class JavaFormatChecker extends FormatChecker {
/// Checks the format of any BUILD.gn files using the "gn format" command.
class GnFormatChecker extends FormatChecker {
GnFormatChecker({
super.processManager,
required super.baseGitRef,
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
required Directory repoDir,
required super.srcDir,
super.allFiles,
super.messageCallback,
required Directory srcDir,
bool allFiles = false,
MessageCallback? messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
) {
gnBinary = File(
path.join(
Expand Down Expand Up @@ -672,14 +687,19 @@ class GnFormatChecker extends FormatChecker {
/// Checks the format of any .py files using the "yapf" command.
class PythonFormatChecker extends FormatChecker {
PythonFormatChecker({
super.processManager,
required super.baseGitRef,
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
required Directory repoDir,
required super.srcDir,
super.allFiles,
super.messageCallback,
required Directory srcDir,
bool allFiles = false,
MessageCallback? messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
) {
yapfBin = File(path.join(
repoDir.absolute.path,
Expand Down Expand Up @@ -767,13 +787,20 @@ class _GrepResult {
/// Checks for trailing whitspace in Dart files.
class WhitespaceFormatChecker extends FormatChecker {
WhitespaceFormatChecker({
super.processManager,
required super.baseGitRef,
required super.repoDir,
required super.srcDir,
super.allFiles,
super.messageCallback,
});
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
required Directory repoDir,
required Directory srcDir,
bool allFiles = false,
MessageCallback? messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
);

@override
Future<bool> checkFormatting() async {
Expand Down
2 changes: 1 addition & 1 deletion ci/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: ci_scripts
publish_to: none
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0-0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion flutter_frontend_server/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ homepage: https://flutter.dev
# relative to this directory into //third_party/dart

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: ">=2.12.0 <3.0.0"

dependencies:
args: any
Expand Down
2 changes: 1 addition & 1 deletion impeller/tessellator/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ publish_to: none
homepage: https://github.com/flutter/impeller/tree/main/tessellator/dart

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'
2 changes: 1 addition & 1 deletion lib/snapshot/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# This file is needed by Fuchsia's dart_library template.

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'
2 changes: 1 addition & 1 deletion lib/web_ui/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ publish_to: none

# Keep the SDK version range in sync with pubspecs under web_sdk
environment:
sdk: '>=2.19.0 <4.0.0'
sdk: ">=2.19.0 <3.0.0"

dependencies:
js: 0.6.4
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart-pkg/fuchsia/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# found in the LICENSE file.

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart-pkg/zircon/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: zircon

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'


# Uncomment block for local testing
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart-pkg/zircon_ffi/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: zircon_ffi

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

dependencies:
ffi: ^1.0.0
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart_runner/embedder/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# template in BUILD.gn.

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart_runner/vmservice/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# found in the LICENSE file.

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

2 changes: 1 addition & 1 deletion shell/platform/fuchsia/flutter/kernel/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# found in the LICENSE file.

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: child_view2

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: parent-view2

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.18.0 <3.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: mouse-input-view

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.18.0 <3.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: text-input-view

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.18.0 <3.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: embedding-flutter-view

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.18.0 <3.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: touch-input-view

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.18.0 <3.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: profiler_symbols
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'
version: 0
description: Extracts a minimal symbols table for the Dart VM profiler
author: Dart Team <misc@dartlang.org>
2 changes: 1 addition & 1 deletion shell/vmservice/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: vmservice_snapshot
publish_to: none
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'
2 changes: 1 addition & 1 deletion sky/packages/sky_engine/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ description: Dart SDK extensions for dart:ui
homepage: http://flutter.io
# sky_engine requires sdk_ext support in the analyzer which was added in 1.11.x
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: ">=2.12.0-0 <3.0.0"
2 changes: 1 addition & 1 deletion testing/android_background_image/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: android_background_image
publish_to: none
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion testing/benchmark/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: flutter_engine_benchmark
publish_to: none
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0-0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion testing/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publish_to: none
# relative to this directory into //third_party/dart

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.17.0 <3.0.0'

dependencies:
litetest: any
Expand Down
2 changes: 1 addition & 1 deletion testing/litetest/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publish_to: none
# relative to this directory into //third_party/dart

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

dependencies:
async_helper: any
Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: scenario_app
publish_to: none
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.17.0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion testing/skia_gold_client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: skia_gold_client
publish_to: none
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion testing/smoke_test_failure/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: smoke_test_failure
publish_to: none
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg or //third_party/dart/third_party/pkg.
Expand Down
2 changes: 1 addition & 1 deletion testing/symbols/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: verify_exported
publish_to: none
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion third_party/web_locale_keymap/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: web_locale_keymap
publish_to: none

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: ">=2.12.0 <3.0.0"

dev_dependencies:
test: ^1.21.7
2 changes: 1 addition & 1 deletion third_party/web_test_fonts/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: web_test_fonts
publish_to: none

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: ">=2.12.0-0 <3.0.0"

dev_dependencies:
args: any
Expand Down
2 changes: 1 addition & 1 deletion third_party/web_unicode/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: web_unicode
publish_to: none

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: ">=2.12.0-0 <3.0.0"

dev_dependencies:
args: any
Expand Down
2 changes: 1 addition & 1 deletion tools/android_lint/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: android_lint
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party.pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion tools/api_check/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publish_to: none
# relative to this directory into //third_party/dart

environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion tools/clang_tidy/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: clang_tidy
publish_to: none
environment:
sdk: '>=3.0.0-0 <4.0.0'
sdk: '>=2.12.0-0 <3.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
Expand Down
Loading