Mark dartdoc deprecated
Mark the `dartdoc` command as deprecated.
It's being replaced by the `dart doc` command.
Part of https://github.com/dart-lang/sdk/issues/44610
Change-Id: Ia0607cb53ef526388a749acb735fd6145149334e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221948
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2c48329..79ffbe8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,15 @@
[an issue]: https://github.com/dart-lang/sdk/issues/new
+- **Breaking Change** [#46100](https://github.com/dart-lang/sdk/issues/46100):
+ The standalone `dartdoc` tool has been
+ marked deprecated as previously announced.
+ Its replacement is the `dart doc` command.
+ Should you find any issues, or missing features, in the replacement
+ command, kindly file [an issue][].
+
+[an issue]: https://github.com/dart-lang/sdk/issues/new
+
#### Linter
Updated the Linter to `1.15.0`, which includes changes that
diff --git a/sdk/bin/dartdoc b/sdk/bin/dartdoc
index f7ad682..b7817c8 100755
--- a/sdk/bin/dartdoc
+++ b/sdk/bin/dartdoc
@@ -3,6 +3,8 @@
# 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.
+echo "Warning: 'dartdoc' is deprecated. Please use 'dart doc'." 1>&2
+
function follow_links() {
file="$1"
while [ -h "$file" ]; do
diff --git a/sdk/bin/dartdoc.bat b/sdk/bin/dartdoc.bat
index 876eb0e..ea32a87 100644
--- a/sdk/bin/dartdoc.bat
+++ b/sdk/bin/dartdoc.bat
@@ -3,6 +3,8 @@
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: 'dartdoc' is deprecated. Please use 'dart doc'. 1>&2
+
setlocal
rem Handle the case where dart-sdk/bin has been symlinked to.
set DIR_NAME_WITH_SLASH=%~dp0