[dart-announce] Breaking change: Deprecation and discontinuation of standalone Dart tools

53 views
Skip to first unread message

'Michael Thomsen' via Dart Announcements

unread,
May 25, 2021, 11:44:41 AM5/25/21
to Dart Announcements
Background

Historically the Dart team has offered a number of smaller developer tools for things like formatting code (dartfmt), analyzing code (dartanalyzer), etc. In Dart 2.10 (October 2020) we introduced a new unified Dart developer tool, the dart tool.

Intended change

As we discussed at launch in the blog post, we plan to first deprecate and then discontinue the smaller tools in favor of the new combined tool. 

The first tools will be deprecated in the upcoming 2.14 release. For details, please see the breaking change issue:
https://github.com/dart-lang/sdk/issues/46100

Rationale

With the new unified tool the existing tools are no longer needed. To reduce maintenance, and ensure we offer a single high-quality toolset the old comments are being removed.

Should you have any issues with missing functionality in the new dart-based tools, please file an issue in the Dart SDK issue tracker.

Migration

To migrate, switch to using the dart tool, and the subcommands listed in the above table.

--
For more ways to connect visit https://dart.dev/community

'Michael Thomsen' via Dart Announcements

unread,
Oct 6, 2021, 8:36:23 AM10/6/21
to Dart Announcements, Michael Thomsen
Update: In the Dart 2.15 release the following changes related to this will happen:
  1. The pub command is deprecated. You can use dart pub (or flutter pub) instead.
  2. The dart2native command is discontinued (removed). Use dart compile.
  3. The dartfmt command is discontinued (removed). Use dart format.

We will continue to update the master tracking issue, https://github.com/dart-lang/sdk/issues/46100, as we move forward.

Chris Norman

unread,
Oct 6, 2021, 9:15:34 AM10/6/21
to mi...@dartlang.org
I quite like this unification. People can always use alias-type commands to bring back the old format if desired.

Take care,

Chris Norman



---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/63fb0279-a96a-4cce-ac75-3793117e1d87n%40dartlang.org.

Bob Nystrom

unread,
Oct 6, 2021, 11:35:45 AM10/6/21
to General Dart Discussion
On Wed, Oct 6, 2021 at 6:15 AM 'Chris Norman' via Dart Misc <mi...@dartlang.org> wrote:
I quite like this unification. People can always use alias-type commands to bring back the old format if desired.

I want to point out that the "dart format" command has a different set of command-line arguments and options, so "dart format" is not a drop-in alias for "dartfmt". I think the new CLI is better—it fixes a lot of the common pitfalls that we were stuck with in the old CLI (like forgetting "-w" and getting a bunch of console spew). The differences are documented here:


Cheers!

– bob

Reply all
Reply to author
Forward
0 new messages