1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-03 00:08:46 +00:00

Remove dartdoc commands

Part of previously announced deprecation, see:
https://github.com/dart-lang/sdk/issues/46100

Fixes https://github.com/dart-lang/sdk/issues/44610

Change-Id: Ic3eaa793149da412b7520b154a0909ee59fbfb5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228647
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
This commit is contained in:
Michael Thomsen 2022-01-27 08:12:00 +00:00 committed by Commit Bot
parent da48a6fb12
commit 208e7bc2e2
8 changed files with 17 additions and 128 deletions

View File

@ -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

View File

@ -23,7 +23,6 @@ const snapshots = <String>[
'dartanalyzer',
'dartdev',
'dartdevc',
'dartdoc',
'dds',
'frontend_server',
'gen_kernel',

View File

@ -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" ]

View File

@ -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/" "$@"

View File

@ -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 <JUNCTION> 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

View File

@ -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"
}
}
}

View File

@ -1,2 +0,0 @@
/dartdoc.Makefile
/dartdoc.target.mk

View File

@ -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" ]
}