Skip to content

[breaking change]: Deprecation and discontinuation of standalone Dart tools #46100

@mit-mit

Description

@mit-mit

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 this meta-bug presents an overview of the status of this migration. As this is considered breaking, it will happen in a staged fashion over time, when each individual tool first becoming deprecated in one stable release (here it will still exist but print a warning), and then fully discontinued (here it will no longer be in the SDK).

Historical tool dart replacement Deprecation Discontinuation
stagehand dart create 2.14 ✅ 2.14*
dartfmt dart format 2.14 2.15
dart2native dart compile exe 2.14 2.15
dart2js dart compile js 2.17 2.18
dartdevc none 2.17 2.18
dartanalyzer & package:analyzer_cli dart analyze 2.16 2.18
dartdoc dart doc 2.16 2.17
pub dart pub 2.15 2.17

Notes:

  • We currently have no plans to deprecate dartaotruntime.
  • stagehand will go directly to discontinuation as it's a pub global tool on pub.dev, and not a SDK distributed tool like the rest. This means it can still be invoked (with dart pub global run stagehand) even after it's been discontinued.
  • dartdevc will be discontinued as a publicly visible tool. The tool was never intended or supported as a stable command line tool for end users. The underlying binary for this compiler will still be shipped with the SDK to be used by build systems tools (such as bazel, webdev, and flutter_tools). However, it will no longer be exposed to be used by developers directly on the command line.

Rationale

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

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

Migration

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

Metadata

Metadata

Assignees

Labels

area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.area-metaCross-cutting, high-level issues (for tracking many other implementation issues, ...).enhancement-breaking-changeAn enhancement which is breaking.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions