diff --git a/CHANGELOG.md b/CHANGELOG.md index aa16e283566..1d166ff1d26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,10 @@ [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 removed as + previously announced. Its replacement is the `dart doc` command. + ## 2.16.0 ### Core libraries diff --git a/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart b/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart index b7c18d165a3..733b711f727 100644 --- a/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart +++ b/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart @@ -23,7 +23,6 @@ const snapshots = [ 'dartanalyzer', 'dartdev', 'dartdevc', - 'dartdoc', 'dds', 'frontend_server', 'gen_kernel', diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 2b4fa76559b..867dd32305c 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -35,7 +35,6 @@ declare_args() { # ......dart or dart.exe (executable) # ......dart.lib (import library for VM native extensions on Windows) # ......dartaotruntime or dartaotruntime.exe (executable) -# ......dartdoc # ......dart2js # ......dartanalyzer # ......dartdevc @@ -48,7 +47,6 @@ declare_args() { # ........dartdev.dart.snapshot # ........dartdev.dill # ........dartdevc.dart.snapshot -# ........dartdoc.dart.snapshot # ........dds.dart.snapshot # ........frontend_server.dart.snapshot # ........gen_kernel.dart.snapshot (if not on ia32) @@ -102,9 +100,6 @@ _full_sdk_scripts = [ "pub", ] -# Scripts not ending in _sdk that go under bin/ -_scripts = [ "dartdoc" ] - # Snapshots that go under bin/snapshots _platform_sdk_snapshots = [ [ @@ -119,10 +114,6 @@ _platform_sdk_snapshots = [ "dartdev", "../utils/dartdev:dartdev", ], - [ - "dartdoc", - "../utils/dartdoc", - ], [ "dds", "../utils/dds:dds", @@ -381,21 +372,6 @@ foreach(sdk_script, _full_sdk_scripts) { } } -foreach(script, _scripts) { - copy("copy_${script}_script") { - visibility = [ - ":copy_full_sdk_scripts", - ":copy_platform_sdk_scripts", - ] - ext = "" - if (is_win) { - ext = ".bat" - } - sources = [ "bin/$script$ext" ] - outputs = [ "$root_out_dir/$dart_sdk_output/bin/{{source_file_part}}" ] - } -} - # This is the main target for copying scripts in _platform_sdk_scripts to bin/ group("copy_platform_sdk_scripts") { visibility = [ ":_create_platform_sdk" ] @@ -403,9 +379,6 @@ group("copy_platform_sdk_scripts") { foreach(sdk_script, _platform_sdk_scripts) { public_deps += [ ":copy_${sdk_script}_script" ] } - foreach(script, _scripts) { - public_deps += [ ":copy_${script}_script" ] - } } # This is the main target for copying scripts in _full_sdk_scripts to bin/ @@ -415,9 +388,6 @@ group("copy_full_sdk_scripts") { foreach(sdk_script, _full_sdk_scripts) { public_deps += [ ":copy_${sdk_script}_script" ] } - foreach(script, _scripts) { - public_deps += [ ":copy_${script}_script" ] - } } # This loop generates "copy" targets that put snapshots into bin/snapshots @@ -461,10 +431,6 @@ group("copy_full_sdk_snapshots") { } } -# This rule writes the .packages file for dartdoc resources. -write_file("$root_out_dir/$dart_sdk_output/bin/resources/dartdoc/.packages", - "dartdoc:.") - # This is the main rule for copying the files that dartdoc needs. group("copy_dartdoc_files") { visibility = [ ":create_common_sdk" ] diff --git a/sdk/bin/dartdoc b/sdk/bin/dartdoc deleted file mode 100755 index b7817c8503a..00000000000 --- a/sdk/bin/dartdoc +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file -# 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 - # On Mac OS, readlink -f doesn't work. - file="$(readlink "$file")" - done - echo "$file" -} - -# Unlike $0, $BASH_SOURCE points to the absolute path of this file. -PROG_NAME="$(follow_links "$BASH_SOURCE")" - -# Handle the case where dart-sdk/bin has been symlinked to. -BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" -SDK_DIR="$(cd "${BIN_DIR}/.." ; pwd -P)" - -SNAPSHOT="$BIN_DIR/snapshots/dartdoc.dart.snapshot" - -# We are running the snapshot in the built SDK. -DART="$BIN_DIR/dart" -exec "$DART" "--packages=$BIN_DIR/resources/dartdoc/.packages" "$SNAPSHOT" "--resources-dir=$BIN_DIR/resources/dartdoc/resources/" "$@" diff --git a/sdk/bin/dartdoc.bat b/sdk/bin/dartdoc.bat deleted file mode 100644 index ea32a87e897..00000000000 --- a/sdk/bin/dartdoc.bat +++ /dev/null @@ -1,46 +0,0 @@ -@echo off -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: '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 -set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%% -call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR -rem Get rid of surrounding quotes. -for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi - -set DART=%BIN_DIR%\dart -set SNAPSHOT=%BIN_DIR%\snapshots\dartdoc.dart.snapshot - -"%DART%" "--packages=%BIN_DIR%/resources/dartdoc/.packages" "%SNAPSHOT%" %* - -endlocal - -exit /b %errorlevel% - -rem Follow the symbolic links (junctions points) using `dir to determine the -rem canonical path. Output with a link looks something like this -rem -rem 01/03/2013 10:11 PM abc def -rem [c:\dart_bleeding\dart-repo.9\dart\out\ReleaseIA32\dart-sdk] -rem -rem So in the output of 'dir /a:l "targetdir"' we are looking for a filename -rem surrounded by right angle bracket and left square bracket. Once we get -rem the filename, which is name of the link, we recursively follow that. -:follow_links -setlocal -for %%i in (%1) do set result=%%~fi -set current= -for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^ - ^| %SystemRoot%\System32\find.exe "> %~n1 [" 2^>nul`) do ( - set current=%%i -) -if not "%current%"=="" call :follow_links "%current%", result -endlocal & set %~2=%result% -goto :eof - -:end diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json index d638c365d05..1d376fe5a09 100644 --- a/tools/bots/test_matrix.json +++ b/tools/bots/test_matrix.json @@ -3574,10 +3574,12 @@ }, { "name": "validate SDK API docs", - "script": "out/ReleaseX64/dart-sdk/bin/dartdoc", + "script": "out/ReleaseX64/dart-sdk/bin/dart", "arguments": [ + "doc", "--sdk-docs", - "--no-generate-docs" + "--dry-run", + "--verbose" ] }, { @@ -4006,7 +4008,8 @@ "--platform=out/ReleaseX64/vm_platform_strong.dill", "--no-aot", "--no-sound-null-safety", - "-o", "runtime/tests/concurrency/generated_stress_test.dart.jit.dill", + "-o", + "runtime/tests/concurrency/generated_stress_test.dart.jit.dill", "runtime/tests/concurrency/generated_stress_test.dart" ] }, @@ -4017,7 +4020,8 @@ "pkg/vm/bin/gen_kernel.dart", "--platform=out/ReleaseX64/vm_platform_strong.dill", "--no-aot", - "-o", "runtime/tests/concurrency/generated_stress_test_nnbd.dart.jit.dill", + "-o", + "runtime/tests/concurrency/generated_stress_test_nnbd.dart.jit.dill", "runtime/tests/concurrency/generated_stress_test_nnbd.dart" ] }, @@ -4029,7 +4033,8 @@ "--platform=out/ReleaseX64/vm_platform_strong.dill", "--aot", "--no-sound-null-safety", - "-o", "runtime/tests/concurrency/generated_stress_test.dart.aot.dill", + "-o", + "runtime/tests/concurrency/generated_stress_test.dart.aot.dill", "runtime/tests/concurrency/generated_stress_test.dart" ] }, @@ -4040,7 +4045,8 @@ "pkg/vm/bin/gen_kernel.dart", "--platform=out/ReleaseX64/vm_platform_strong.dill", "--aot", - "-o", "runtime/tests/concurrency/generated_stress_test_nnbd.dart.aot.dill", + "-o", + "runtime/tests/concurrency/generated_stress_test_nnbd.dart.aot.dill", "runtime/tests/concurrency/generated_stress_test_nnbd.dart" ] }, @@ -4166,4 +4172,4 @@ "macos": "buildtools/mac-x64/clang/bin/llvm-symbolizer", "windows": "buildtools/win-x64/clang/bin/llvm-symbolizer.exe" } -} +} \ No newline at end of file diff --git a/utils/dartdoc/.gitignore b/utils/dartdoc/.gitignore deleted file mode 100644 index ce5803f47d9..00000000000 --- a/utils/dartdoc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/dartdoc.Makefile -/dartdoc.target.mk diff --git a/utils/dartdoc/BUILD.gn b/utils/dartdoc/BUILD.gn deleted file mode 100644 index 0ba4fe2b644..00000000000 --- a/utils/dartdoc/BUILD.gn +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file -# 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. - -import("../application_snapshot.gni") - -application_snapshot("dartdoc") { - main_dart = "../../third_party/pkg/dartdoc/bin/dartdoc.dart" - training_args = [ "--help" ] -}