Skip to content

Commit

Permalink
Use checked-in .package file for building and testing
Browse files Browse the repository at this point in the history
Stop creating [build dir]/packages directory with symbolic links.

BUG=#23565
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/1746743002 .
  • Loading branch information
whesse committed Sep 15, 2016
1 parent 1c957d5 commit 5d3e356
Show file tree
Hide file tree
Showing 26 changed files with 181 additions and 225 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ client/tests/drt
# Pub generated "packages" directories and files
packages
pubspec.lock
.packages

# Local pub storage
.pub
Expand Down
103 changes: 103 additions & 0 deletions .packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# 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.
#
# .package file containing links to all packages in /pkg, and checked out
# by DEPS into /third_party/pkg and /third_party/pkg_tested.
# Please update this file if you add a package to DEPS or /pkg
#
analysis_server:pkg/analysis_server/lib
analyzer:pkg/analyzer/lib
analyzer_cli:pkg/analyzer_cli/lib
args:third_party/pkg/args/lib
async:third_party/pkg/async/lib
async_helper:pkg/async_helper/lib
barback:third_party/pkg/barback/lib
bazel_worker:third_party/pkg/bazel_worker/lib
boolean_selector:third_party/pkg/boolean_selector/lib
browser:pkg/browser/lib
charcode:third_party/pkg/charcode/lib
charted:third_party/observatory_pub_packages/packages/charted/lib
cli_util:third_party/pkg/cli_util/lib
code_transformers:third_party/pkg/code_transformers/lib
collection:third_party/pkg/collection/lib
compiler:pkg/compiler/lib
# Compiler is imported as compiler_unsupported so it can work outside the SDK.
compiler_unsupported:pkg/compiler/lib
convert:third_party/pkg/convert/lib
crypto:third_party/pkg/crypto/lib
csslib:third_party/pkg/csslib/lib
dart2js_incremental:pkg/dart2js_incremental/lib
dart2js_info:third_party/pkg/dart2js_info/lib
dart_messages:pkg/dart_messages/lib
dart_style:third_party/pkg_tested/dart_style/lib
dartdoc:third_party/pkg/dartdoc/lib
dev_compiler:pkg/dev_compiler/lib
expect:pkg/expect/lib
fixnum:third_party/pkg/fixnum/lib
func:third_party/pkg/func/lib
glob:third_party/pkg/glob/lib
html:third_party/pkg/html/lib
http:third_party/pkg/http/lib
http_multi_server:third_party/pkg/http_multi_server/lib
http_parser:third_party/pkg/http_parser/lib
http_throttle:third_party/pkg/http_throttle/lib
initialize:third_party/pkg/initialize/lib
intl:third_party/pkg/intl/lib
isolate:third_party/pkg/isolate/lib
js:pkg/js/lib
js_ast:pkg/js_ast/lib
js_runtime:sdk/lib/_internal/js_runtime/lib
json_rpc_2:third_party/pkg/json_rpc_2/lib
kernel:third_party/pkg/kernel/lib
linter:third_party/pkg/linter/lib
logging:third_party/pkg/logging/lib
lookup_map:pkg/lookup_map/lib
markdown:third_party/pkg/markdown/lib
matcher:third_party/pkg/matcher/lib
meta:pkg/meta/lib
metatest:third_party/pkg/metatest/lib
microlytics:pkg/microlytics/lib
mime:third_party/pkg/mime/lib
mustache4dart:third_party/pkg/mustache4dart/lib
oauth2:third_party/pkg/oauth2/lib
observatory:runtime/observatory/lib
observe:third_party/pkg/observe/lib
package_config:third_party/pkg_tested/package_config/lib
package_resolver:third_party/pkg_tested/package_resolver/lib
path:third_party/pkg/path/lib
petitparser:third_party/pkg/petitparser/lib
plugin:third_party/pkg/plugin/lib
pool:third_party/pkg/pool/lib
protobuf:third_party/pkg/protobuf/lib
pub:third_party/pkg/pub/lib
pub_cache:third_party/pkg/pub_cache/lib
pub_semver:third_party/pkg/pub_semver/lib
quiver:third_party/pkg/quiver/lib
resource:third_party/pkg/resource/lib
scheduled_test:third_party/pkg/scheduled_test/lib
sdk_library_metadata:sdk/lib/_internal/sdk_library_metadata/lib
shelf:third_party/pkg/shelf/lib
shelf_packages_handler:third_party/pkg/shelf_packages_handler/lib
shelf_static:third_party/pkg/shelf_static/lib
shelf_web_socket:third_party/pkg/shelf_web_socket/lib
smoke:third_party/pkg/smoke/lib
source_map_stack_trace:third_party/pkg/source_map_stack_trace/lib
source_maps:third_party/pkg/source_maps/lib
source_span:third_party/pkg/source_span/lib
stack_trace:third_party/pkg/stack_trace/lib
stream_channel:third_party/pkg/stream_channel/lib
string_scanner:third_party/pkg/string_scanner/lib
test:third_party/pkg/test/lib
test_reflective_loader:third_party/pkg/test_reflective_loader/lib
typed_data:third_party/pkg/typed_data/lib
typed_mock:pkg/typed_mock/lib
unittest:third_party/pkg/unittest/lib
usage:third_party/pkg/usage/lib
utf:third_party/pkg/utf/lib
watcher:third_party/pkg/watcher/lib
web_components:third_party/pkg/web_components/lib
web_socket_channel:third_party/pkg/web_socket_channel/lib
when:third_party/pkg/when/lib
which:third_party/pkg/which/lib
yaml:third_party/pkg/yaml/lib
6 changes: 4 additions & 2 deletions pkg/pkg.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/packages.stamp',
'<(PRODUCT_DIR)/.packages',
],
'action': [
'python', '../tools/make_links.py',
'python', '../tools/make_links.py', '--create-links',
'--create-package-file',
'--timestamp_file=<(SHARED_INTERMEDIATE_DIR)/packages.stamp',
'<(PRODUCT_DIR)/packages',
'<(PRODUCT_DIR)',
'<@(_inputs)',
# Pub imports dart2js as compiler_unsupported so it can work outside
# the SDK. Map that to the compiler package.
Expand Down
1 change: 0 additions & 1 deletion runtime/dart-runtime.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@
'target_name': 'runtime_all',
'type': 'none',
'dependencies': [
'../pkg/pkg.gyp:pkg_packages',
'sample_extension',
],
},
Expand Down
2 changes: 0 additions & 2 deletions runtime/observatory/observatory.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
'type': 'none',
'dependencies': [
'dart_bootstrap#host',
# We use packages for building
'../pkg/pkg.gyp:pkg_packages#target',
],
'toolsets': ['host'],
'actions': [
Expand Down
39 changes: 1 addition & 38 deletions sdk/bin/dart2js
Original file line number Diff line number Diff line change
Expand Up @@ -52,41 +52,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"

DART2JS="$DART_ROOT/pkg/compiler/lib/src/dart2js.dart"

if [[ `uname` == 'Darwin' ]]; then
OUT_DIR="$DART_ROOT/xcodebuild/"
else
OUT_DIR="$DART_ROOT/out/"
fi

if [ -z "$DART_CONFIGURATION" ];
then
DIRS=$( ls "$OUT_DIR" )
# list of possible configurations in decreasing desirability
CONFIGS=("ReleaseX64" "ReleaseIA32" "DebugX64" "DebugIA32"
"ReleaseARM" "ReleaseARM64" "ReleaseARMV5TE" "ReleaseMIPS"
"DebugARM" "DebugARM64" "DebugARMV5TE" "DebugMIPS")
DART_CONFIGURATION="None"
for CONFIG in ${CONFIGS[*]}
do
for DIR in $DIRS;
do
if [ "$CONFIG" = "$DIR" ];
then
# choose most desirable configuration that is available and break
DART_CONFIGURATION="$DIR"
break 2
fi
done
done
if [ "$DART_CONFIGURATION" = "None" ]
then
echo "No valid dart configuration found in $OUT_DIR"
exit 1
fi
fi

BUILD_DIR="$OUT_DIR$DART_CONFIGURATION"

PACKAGE_ROOT="$BUILD_DIR/packages/"

exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "--package-root=$PACKAGE_ROOT" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@"
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@"
9 changes: 1 addition & 8 deletions sdk/bin/dart2js.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%

set DART2JS=%DART_ROOT%\pkg\compiler\lib\src\dart2js.dart

rem DART_CONFIGURATION defaults to ReleaseX64
if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64

set BUILD_DIR=%DART_ROOT%\out\%DART_CONFIGURATION%

set PACKAGE_ROOT=%BUILD_DIR%\packages

"%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "%DART2JS%" %EXTRA_OPTIONS% %*
"%DART%" %EXTRA_VM_OPTIONS% "%DART2JS%" %EXTRA_OPTIONS% %*

endlocal

Expand Down
40 changes: 1 addition & 39 deletions sdk/bin/dartanalyzer
Original file line number Diff line number Diff line change
Expand Up @@ -45,42 +45,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"

ANALYZER="$DART_ROOT/pkg/analyzer_cli/bin/analyzer.dart"

if [[ `uname` == 'Darwin' ]];
then
OUT_DIR="$DART_ROOT/xcodebuild/"
else
OUT_DIR="$DART_ROOT/out/"
fi

if [ -z "$DART_CONFIGURATION" ];
then
DIRS=$( ls "$OUT_DIR" )
# list of possible configurations in decreasing desirability
CONFIGS=("ReleaseX64" "ReleaseIA32" "DebugX64" "DebugIA32"
"ReleaseARM" "ReleaseARM64" "ReleaseARMV5TE" "ReleaseMIPS"
"DebugARM" "DebugARM64" "DebugARMV5TE" "DebugMIPS")
DART_CONFIGURATION="None"
for CONFIG in ${CONFIGS[*]}
do
for DIR in $DIRS;
do
if [ "$CONFIG" = "$DIR" ];
then
# choose most desirable configuration that is available and break
DART_CONFIGURATION="$DIR"
break 2
fi
done
done
if [ "$DART_CONFIGURATION" = "None" ]
then
echo "No valid dart configuration found in $OUT_DIR"
exit 1
fi
fi

BUILD_DIR="$OUT_DIR$DART_CONFIGURATION"

PACKAGE_ROOT="$BUILD_DIR/packages/"

exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "--package-root=$PACKAGE_ROOT" "$ANALYZER" "$SDK_ARG" "$@"
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$ANALYZER" "$SDK_ARG" "$@"
9 changes: 1 addition & 8 deletions sdk/bin/dartanalyzer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%

set ANALYZER=%DART_ROOT%\pkg\analyzer_cli\bin\analyzer.dart

rem DART_CONFIGURATION defaults to ReleaseX64
if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64

set BUILD_DIR=%DART_ROOT%\out\%DART_CONFIGURATION%

set PACKAGE_ROOT=%BUILD_DIR%\packages

"%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "%ANALYZER%" "%SDK_ARG%" %*
"%DART%" %EXTRA_VM_OPTIONS% "%ANALYZER%" "%SDK_ARG%" %*

endlocal

Expand Down
40 changes: 1 addition & 39 deletions sdk/bin/dartdevc
Original file line number Diff line number Diff line change
Expand Up @@ -45,42 +45,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"

DEV_COMPILER="$DART_ROOT/pkg/dev_compiler/bin/dartdevc.dart"

if [[ `uname` == 'Darwin' ]];
then
OUT_DIR="$DART_ROOT/xcodebuild/"
else
OUT_DIR="$DART_ROOT/out/"
fi

if [ -z "$DART_CONFIGURATION" ];
then
DIRS=$( ls "$OUT_DIR" )
# list of possible configurations in decreasing desirability
CONFIGS=("ReleaseX64" "ReleaseIA32" "DebugX64" "DebugIA32"
"ReleaseARM" "ReleaseARM64" "ReleaseARMV5TE" "ReleaseMIPS"
"DebugARM" "DebugARM64" "DebugARMV5TE" "DebugMIPS")
DART_CONFIGURATION="None"
for CONFIG in ${CONFIGS[*]}
do
for DIR in $DIRS;
do
if [ "$CONFIG" = "$DIR" ];
then
# choose most desirable configuration that is available and break
DART_CONFIGURATION="$DIR"
break 2
fi
done
done
if [ "$DART_CONFIGURATION" = "None" ]
then
echo "No valid dart configuration found in $OUT_DIR"
exit 1
fi
fi

BUILD_DIR="$OUT_DIR$DART_CONFIGURATION"

PACKAGE_ROOT="$BUILD_DIR/packages/"

exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "--package-root=$PACKAGE_ROOT" "$DEV_COMPILER" "$SDK_ARG" "$@"
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$DEV_COMPILER" "$SDK_ARG" "$@"
9 changes: 1 addition & 8 deletions sdk/bin/dartdevc.bat
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%

set DEV_COMPILER=%DART_ROOT%\third_party\pkg\dev_compiler\bin\dartdevc.dart

rem DART_CONFIGURATION defaults to ReleaseX64
if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64

set BUILD_DIR=%DART_ROOT%\out\%DART_CONFIGURATION%

set PACKAGE_ROOT=%BUILD_DIR%\packages

"%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "DEV_COMPILER%" "%SDK_ARG%" %*
"%DART%" %EXTRA_VM_OPTIONS% "DEV_COMPILER%" "%SDK_ARG%" %*

endlocal

Expand Down
15 changes: 1 addition & 14 deletions sdk/bin/dartfmt
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"

DARTFMT="$DART_ROOT/third_party/pkg_tested/dart_style/bin/format.dart"

if [ -z "$DART_CONFIGURATION" ];
then
DART_CONFIGURATION="ReleaseX64"
fi

if [[ `uname` == 'Darwin' ]]; then
BUILD_DIR="$DART_ROOT/xcodebuild/$DART_CONFIGURATION"
else
BUILD_DIR="$DART_ROOT/out/$DART_CONFIGURATION"
fi

PACKAGE_ROOT="$BUILD_DIR/packages/"

exec "$DART" "--package-root=$PACKAGE_ROOT" "$DARTFMT" "$@"
exec "$DART" "$DARTFMT" "$@"
9 changes: 1 addition & 8 deletions sdk/bin/dartfmt.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%

set DARTFMT=%DART_ROOT%\third_party\pkg_tested\dart_style\bin\format.dart

rem DART_CONFIGURATION defaults to ReleaseX64
if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64

set BUILD_DIR=%DART_ROOT%\out\%DART_CONFIGURATION%

set PACKAGE_ROOT=%BUILD_DIR%\packages

"%DART%" "--package-root=%PACKAGE_ROOT%" "%DARTFMT%" %*
"%DART%" "%DARTFMT%" %*

endlocal

Expand Down
3 changes: 1 addition & 2 deletions sdk/bin/pub
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ fi
# Use the Dart binary in the built SDK so pub can find the version file next
# to it.
DART="$BUILD_DIR/dart-sdk/bin/dart"
PACKAGES_DIR="$BUILD_DIR/packages/"

# Run pub.
PUB="$SDK_DIR/../third_party/pkg/pub/bin/pub.dart"
exec "$DART" "${VM_OPTIONS[@]}" "--package-root=$PACKAGES_DIR" "$PUB" "$@"
exec "$DART" "${VM_OPTIONS[@]}" "$PUB" "$@"
3 changes: 1 addition & 2 deletions sdk/bin/pub.bat
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ if not "_%DART_VM_OPTIONS%_" == "__" (
rem Use the Dart binary in the built SDK so pub can find the version file next
rem to it.
set BUILD_DIR=%SDK_DIR%\..\out\ReleaseX64
set PACKAGES_DIR=%BUILD_DIR%\packages
set DART=%BUILD_DIR%\dart-sdk\bin\dart

rem Run pub.
set PUB="%SDK_DIR%\..\third_party\pkg\pub\bin\pub.dart"
"%DART%" %VM_OPTIONS% --package-root="%PACKAGES_DIR%" "%PUB%" %*
"%DART%" %VM_OPTIONS% "%PUB%" %*

endlocal

Expand Down
Loading

0 comments on commit 5d3e356

Please sign in to comment.