Add deprecation warning to dartfmt.

Change-Id: I7c67041fc84cddbc44b54e629eee79548fd6566b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202144
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
This commit is contained in:
Robert Nystrom 2021-06-03 10:11:24 +00:00 committed by commit-bot@chromium.org
parent abbff018c0
commit 4333b3db98
5 changed files with 30 additions and 9 deletions

View file

@ -42,6 +42,7 @@
was abandoned more than 5 years ago and is not supported by most browsers.
The `dart:web_sql` library has been documented as unsupported and deprecated
for many years as well and but wasn't annotated properly until now.
### Dart VM
* **Breaking Change** [#45071][]: `Dart_NewWeakPersistentHandle`'s and
@ -55,17 +56,25 @@
#### Dart command line
* **Breaking Change** [#46100][]: The standalone `dart2native` has been marked
deprecated, and now prints a warning message. It's replacement is the `dart
compile exe` and `dart compile aot-snapshot` commands, which offer the same
functionality. The `dart2native` tool will be discontinued (removed from the
Dart SDK) in Dart 2.15.
* **Breaking Change** [#46100][]: The standalone `dart2native` tool has been
marked deprecated, and now prints a warning message. Its replacements are
the `dart compile exe` and `dart compile aot-snapshot` commands, which offer
the same functionality. The `dart2native` tool will be removed from the Dart
SDK in Dart 2.15.
https://github.com/dart-lang/sdk/issues/46100
* **Breaking Change**: The standalone `dartfmt` tool has been marked
deprecated, and now prints a warning message. Instead, use `dart format`.
The `dartfmt` tool will be removed from the Dart SDK in Dart 2.15.
* The `dart create` command has been updated to create projects that use the new
'recommended' set of lints from `package:lints`. See https://dart.dev/go/core-lints
for more information about these lints.
Note that `dart format` has [a different set of options and
defaults][dartfmt cli] than `dartfmt`.
* The `dart create` command has been updated to create projects that use the
new 'recommended' set of lints from `package:lints`. See
https://dart.dev/go/core-lints for more information about these lints.
[#46100]: https://github.com/dart-lang/sdk/issues/46100
[dartfmt cli]: https://github.com/dart-lang/dart_style/wiki/CLI-Changes
* The `dart analyze` command has been extended to support specifying multiple
files or directories to analyze; see also https://github.com/dart-lang/sdk/issues/45352.

View file

@ -6,6 +6,9 @@
# Run dart_style/bin/format.dart on the Dart VM. This script assumes the Dart
# repo's directory structure.
echo "Warning: 'dartfmt' is deprecated. Please use 'dart format'." 1>&2
echo "(See https://github.com/dart-lang/dart_style/wiki/CLI-Changes.)" 1>&2
function follow_links() {
file="$1"
while [ -h "$file" ]; do

View file

@ -3,6 +3,9 @@ REM Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
REM for details. All rights reserved. Use of this source code is governed by a
REM BSD-style license that can be found in the LICENSE file.
echo Warning: 'dartfmt' is deprecated. Please use 'dart format'. 1>&2
echo (See https://github.com/dart-lang/dart_style/wiki/CLI-Changes.) 1>&2
setlocal
rem Handle the case where dart-sdk/bin has been symlinked to.
set DIR_NAME_WITH_SLASH=%~dp0

View file

@ -6,6 +6,9 @@
# Run dart_style/bin/format.dart on the Dart VM. This script assumes the Dart
# SDK's directory structure.
echo "Warning: 'dartfmt' is deprecated. Please use 'dart format'." 1>&2
echo "(See https://github.com/dart-lang/dart_style/wiki/CLI-Changes.)" 1>&2
function follow_links() {
file="$1"
while [ -h "$file" ]; do

View file

@ -3,6 +3,9 @@ REM Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
REM for details. All rights reserved. Use of this source code is governed by a
REM BSD-style license that can be found in the LICENSE file.
echo Warning: 'dartfmt' is deprecated. Please use 'dart format'. 1>&2
echo (See https://github.com/dart-lang/dart_style/wiki/CLI-Changes.) 1>&2
setlocal
rem Handle the case where dart-sdk/bin has been symlinked to.
set DIR_NAME_WITH_SLASH=%~dp0