[dartdevc] remove unused dartdevk binary, fixes #35483

It's simply an alias for `dartdevc --kernel`, and now that build_runner
is switching to that, there's no reason to keep it around anymore.

Change-Id: I43d30a582314a236bcfa2e3a0b50bb48ddac79f8
Reviewed-on: https://dart-review.googlesource.com/c/88281
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
This commit is contained in:
Jenny Messerly 2019-01-04 17:19:52 +00:00 committed by commit-bot@chromium.org
parent 7fd0c78c15
commit 3d6acab3e7
15 changed files with 32 additions and 254 deletions

View file

@ -56,7 +56,7 @@ class _CompilerWorker extends AsyncWorkerLoop {
}
}
/// Runs dartdevk in batch mode for test.dart.
/// Runs DDC in Kernel batch mode for test.dart.
Future runBatch(ParsedArguments batchArgs) async {
var totalTests = 0;
var failedTests = 0;

View file

@ -1,10 +0,0 @@
#!/usr/bin/env dart
// Copyright (c) 2017, 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 'dartdevc.dart' as dartdevc;
/// Experimental command line entry point for Dart Development Compiler.
/// Unlike `dartdevc` this version uses the shared front end and IR.
main(List<String> args) => dartdevc.main(args.toList()..add('--kernel'));

View file

@ -48,7 +48,7 @@ Map<String, String> sdkLibraryVariables = {
'dart.library.web_sql': 'true',
};
/// Shared compiler options between `dartdevc` and `dartdevk`.
/// Shared compiler options between `dartdevc` kernel and analyzer backends.
class SharedCompilerOptions {
/// Whether to emit the source mapping file.
///

View file

@ -80,7 +80,9 @@ Future<CompilerResult> _compile(List<String> args,
..addMultiOption('multi-root',
help: 'The directories to search when encountering uris with the '
'specified multi-root scheme.',
defaultsTo: [Uri.base.path]);
defaultsTo: [Uri.base.path])
..addOption('dart-sdk',
help: '(unsupported with --kernel) path to the Dart SDK.', hide: true);
SharedCompilerOptions.addArguments(argParser);
var declaredVariables = parseAndRemoveDeclaredVariables(args);

View file

@ -54,8 +54,6 @@ class DevCompilerRunner implements CompilerRunner {
File ddcSdkSummary = findInOutDir("gen/utils/dartdevc/kernel/ddc_sdk.dill");
var ddc = getDdcDir().uri.resolve("bin/dartdevk.dart");
List<String> args = <String>[
"--packages=${sdkRoot.uri.resolve(".packages").toFilePath()}",
"--modules=es6",
@ -77,8 +75,10 @@ class DevCompilerRunner implements CompilerRunner {
}
if (!succeeded) {
var ddc = getDdcDir().uri.resolve("bin/dartdevc.dart");
throw "Error from ddc when executing with something like "
"$dartExecutable ${ddc.toFilePath()} "
"$dartExecutable ${ddc.toFilePath()} --kernel "
"${args.reduce((value, element) => '$value "$element"')}";
}

View file

@ -112,7 +112,8 @@ void main(List<String> args) {
}
ProcessResult result;
if (kernel) {
result = runDdc('dartdevk', [
result = runDdc('dartdevc', [
'--kernel',
'--modules=$mod',
'--dart-sdk-summary=$ddcSdk',
'-o',

View file

@ -68,13 +68,13 @@ if [ "$KERNEL" = true ]; then
if [ ! -e $GEN_DIR/kernel/ddc_sdk.dill ]; then
echo "DDC SDK must be built first, please run:"
echo " pushd $SDKDIR"
echo " ./tools/build.py -m release dartdevk_sdk"
echo " ./tools/build.py -m release dartdevc_kernel_sdk"
exit 1
fi
NODE_PATH=$GEN_DIR/kernel/common:$LIBROOT:$NODE_PATH
$SDK_DIR/sdk/bin/dartdevk --modules=node \
$SDK_DIR/sdk/bin/dartdevc --kernel --modules=node \
--dart-sdk-summary=$GEN_DIR/ddc_sdk.sum \
-o $LIBROOT/$BASENAME.js $*
else

View file

@ -68,13 +68,13 @@ if [ "$KERNEL" = true ]; then
if [ ! -e $GEN_DIR/kernel/ddc_sdk.dill ]; then
echo "DDC SDK must be built first, please run:"
echo " pushd $SDKDIR"
echo " ./tools/build.py -m release dartdevk_sdk"
echo " ./tools/build.py -m release dartdevc_kernel_sdk"
exit 1
fi
NODE_PATH=$GEN_DIR/kernel/common:$LIBROOT:$NODE_PATH
dart -c $SDK_DIR/pkg/dev_compiler/bin/dartdevk.dart --modules=node \
dart -c $SDK_DIR/pkg/dev_compiler/bin/dartdevc.dart --kernel --modules=node \
--dart-sdk-summary=$GEN_DIR/kernel/ddc_sdk.dill \
-o $LIBROOT/$BASENAME.js $*
else

View file

@ -35,7 +35,6 @@ declare_args() {
# ......dart2js
# ......dartanalyzer
# ......dartdevc
# ......dartdevk
# ......pub
# ......snapshots/
# ........analysis_server.dart.snapshot
@ -44,7 +43,6 @@ declare_args() {
# ........dartdoc.dart.snapshot
# ........dartfmt.dart.snapshot
# ........dartdevc.dart.snapshot
# ........dartdevk.dart.snapshot
# ........kernel_worker.dart.snapshot
# ........pub.dart.snapshot
#.........resources/
@ -93,7 +91,6 @@ _full_sdk_scripts = [
"dart2js",
"dartanalyzer",
"dartdevc",
"dartdevk",
"dartfmt",
"pub",
]
@ -150,10 +147,6 @@ _full_sdk_snapshots = [
"dartdevc",
"../utils/dartdevc",
],
[
"dartdevk",
"../utils/dartdevc:dartdevk",
],
[
"dartdoc",
"../utils/dartdoc",
@ -523,7 +516,7 @@ copy("copy_dev_compiler_summary") {
deps = [
":copy_libraries",
"../utils/dartdevc:dartdevc_sdk",
"../utils/dartdevc:dartdevk_sdk",
"../utils/dartdevc:dartdevc_kernel_sdk",
]
gen_dir = get_label_info("../utils/dartdevc:dartdevc_sdk", "target_gen_dir")
sources = [
@ -610,9 +603,9 @@ copy("copy_dev_compiler_js_legacy") {
copy("copy_dev_compiler_js_amd_kernel") {
visibility = [ ":copy_dev_compiler_js" ]
deps = [
"../utils/dartdevc:dartdevk_sdk",
"../utils/dartdevc:dartdevc_kernel_sdk",
]
gen_dir = get_label_info("../utils/dartdevc:dartdevk_sdk",
gen_dir = get_label_info("../utils/dartdevc:dartdevc_kernel_sdk",
"target_gen_dir")
sources = [
"$gen_dir/kernel/amd/dart_sdk.js",
@ -628,9 +621,9 @@ copy("copy_dev_compiler_js_amd_kernel") {
copy("copy_dev_compiler_js_common_kernel") {
visibility = [ ":copy_dev_compiler_js" ]
deps = [
"../utils/dartdevc:dartdevk_sdk",
"../utils/dartdevc:dartdevc_kernel_sdk",
]
gen_dir = get_label_info("../utils/dartdevc:dartdevk_sdk",
gen_dir = get_label_info("../utils/dartdevc:dartdevc_kernel_sdk",
"target_gen_dir")
sources = [
"$gen_dir/kernel/common/dart_sdk.js",
@ -646,9 +639,9 @@ copy("copy_dev_compiler_js_common_kernel") {
copy("copy_dev_compiler_js_es6_kernel") {
visibility = [ ":copy_dev_compiler_js" ]
deps = [
"../utils/dartdevc:dartdevk_sdk",
"../utils/dartdevc:dartdevc_kernel_sdk",
]
gen_dir = get_label_info("../utils/dartdevc:dartdevk_sdk",
gen_dir = get_label_info("../utils/dartdevc:dartdevc_kernel_sdk",
"target_gen_dir")
sources = [
"$gen_dir/kernel/es6/dart_sdk.js",
@ -663,9 +656,9 @@ copy("copy_dev_compiler_js_es6_kernel") {
copy("copy_dev_compiler_js_legacy_kernel") {
visibility = [ ":copy_dev_compiler_js" ]
deps = [
"../utils/dartdevc:dartdevk_sdk",
"../utils/dartdevc:dartdevc_kernel_sdk",
]
gen_dir = get_label_info("../utils/dartdevc:dartdevk_sdk",
gen_dir = get_label_info("../utils/dartdevc:dartdevc_kernel_sdk",
"target_gen_dir")
sources = [
"$gen_dir/kernel/legacy/dart_sdk.js",

View file

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2017, 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.
# Run dev compiler using the common front-end on the Dart VM. This script
# assumes the Dart repo's directory structure.
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)"
DART="$BIN_DIR/dart"
unset EXTRA_VM_OPTIONS
declare -a EXTRA_VM_OPTIONS
case $0 in
*_developer)
EXTRA_VM_OPTIONS+=('--checked')
;;
esac
# We allow extra vm options to be passed in through an environment variable.
if [[ $DART_VM_OPTIONS ]]; then
read -a OPTIONS <<< "$DART_VM_OPTIONS"
EXTRA_VM_OPTIONS+=("${OPTIONS[@]}")
fi
DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
DEV_COMPILER="$DART_ROOT/pkg/dev_compiler/bin/dartdevk.dart"
exec "$DART" "--packages=$DART_ROOT/.packages" "${EXTRA_VM_OPTIONS[@]}" "$DEV_COMPILER" "$@"

View file

@ -1,64 +0,0 @@
@echo off
REM Copyright (c) 2017, 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.
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
rem Get absolute full name for SDK_DIR.
for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
rem Remove trailing backslash if there is one
if %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
set EXTRA_VM_OPTIONS=
rem We allow extra vm options to be passed in through an environment variable.
if not "_%DART_VM_OPTIONS%_" == "__" (
set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% %DART_VM_OPTIONS%
)
rem Get absolute full name for DART_ROOT.
for %%i in ("%SDK_DIR%\..\") do set DART_ROOT=%%~fi
rem Remove trailing backslash if there is one
if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
set DEV_COMPILER=%DART_ROOT%\pkg\dev_compiler\bin\dartdevk.dart
"%DART%" "--packages=%DART_ROOT%\.packages" %EXTRA_VM_OPTIONS% "%DEV_COMPILER%" %*
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 ^
^| find "> %~n1 [" 2^>nul`) do (
set current=%%i
)
if not "%current%"=="" call :follow_links "%current%", result
endlocal & set %~2=%result%
goto :eof
:end

View file

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2017, 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.
# Run dev compiler using the common front-end on the Dart VM. This script
# assumes the Dart SDK's directory structure.
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)"
SNAPSHOT="$BIN_DIR/snapshots/dartdevk.dart.snapshot"
# We are running the snapshot in the built SDK.
DART="$BIN_DIR/dart"
exec "$DART" "$SNAPSHOT" "$@"

View file

@ -1,50 +0,0 @@
@echo off
REM Copyright (c) 2017, 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.
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\dartdevk.dart.snapshot
rem Get absolute full name for SDK_DIR.
for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
rem Remove trailing backslash if there is one
if %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
"%DART%" "%SNAPSHOT%" "--packages=%SDK_DIR%\..\..\..\.packages" %*
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 ^
^| find "> %~n1 ["`) do (
set current=%%i
)
if not "%current%"=="" call :follow_links "%current%", result
endlocal & set %~2=%result%
goto :eof
:end

View file

@ -478,7 +478,7 @@ class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
}
}
/// Configuration for `dartdevc` and `dartdevk`
/// Configuration for `dartdevc` and `dartdevk` (DDC with Kernel)
class DevCompilerConfiguration extends CompilerConfiguration {
DevCompilerConfiguration(TestConfiguration configuration)
: super._subclass(configuration);

View file

@ -33,25 +33,6 @@ application_snapshot("dartdevc") {
inputs = [ sdk_summary ]
}
application_snapshot("dartdevk") {
main_dart = "../../pkg/dev_compiler/bin/dartdevk.dart"
training_args = [
"--dart-sdk-summary",
rebase_path(sdk_dill),
"-o",
"dartdevk.js",
rebase_path("../../pkg/dev_compiler/bin/dartdevk.dart"),
]
deps = [
":dartdevc_sdk",
":dartdevk_sdk",
]
inputs = [ sdk_dill, sdk_libraries_json ]
}
sdk_lib_files = exec_script("../../tools/list_dart_files.py",
[
"absolute",
@ -225,25 +206,24 @@ prebuilt_dart_action("dartdevc_sdk") {
]
}
# Builds everything needed to run dartdevc and dartdevk tests using test.dart.
# Builds everything needed to run dartdevc tests using test.dart.
group("dartdevc_test") {
deps = [
":dartdevc",
":dartdevc_sdk",
":dartdevk_sdk",
":dartdevc_kernel_sdk",
":dartdevc_test_pkg",
":dartdevk",
"../../sdk:create_sdk",
]
}
# Builds everything needed to run dartdevc and dartdevk tests locally using
# test.dart without --use-sdk. This is the same as dartdevc_test, but skips
# things rely on building the Dart VM and create_sdk.
# Builds everything needed to run dartdevc tests locally using test.dart without
# --use-sdk. This is the same as dartdevc_test, but skips things rely on
# building the Dart VM and create_sdk.
group("dartdevc_test_local") {
deps = [
":dartdevc_sdk",
":dartdevk_sdk",
":dartdevc_kernel_sdk",
":dartdevc_test_pkg",
]
}
@ -264,7 +244,7 @@ prebuilt_dart_action("dartdevc_test_pkg") {
deps = [
":dartdevc_files_stamp",
":dartdevc_sdk",
":dartdevk_sdk",
":dartdevc_kernel_sdk",
"../../pkg:pkg_files_stamp",
]
@ -335,7 +315,7 @@ prebuilt_dart_action("dartdevc_test_pkg") {
}
# Compiles the DDC SDK's kernel summary and JS code.
prebuilt_dart_action("dartdevk_sdk") {
prebuilt_dart_action("dartdevc_kernel_sdk") {
deps = [
"../../pkg:pkg_files_stamp",
":dartdevc_files_stamp",