Skip to content

Commit 5d3e356

Browse files
committed
Use checked-in .package file for building and testing
Stop creating [build dir]/packages directory with symbolic links. BUG=#23565 [email protected] Review URL: https://codereview.chromium.org/1746743002 .
1 parent 1c957d5 commit 5d3e356

26 files changed

+181
-225
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ client/tests/drt
5050
# Pub generated "packages" directories and files
5151
packages
5252
pubspec.lock
53-
.packages
5453

5554
# Local pub storage
5655
.pub

.packages

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2+
# for details. All rights reserved. Use of this source code is governed by a
3+
# BSD-style license that can be found in the LICENSE file.
4+
#
5+
# .package file containing links to all packages in /pkg, and checked out
6+
# by DEPS into /third_party/pkg and /third_party/pkg_tested.
7+
# Please update this file if you add a package to DEPS or /pkg
8+
#
9+
analysis_server:pkg/analysis_server/lib
10+
analyzer:pkg/analyzer/lib
11+
analyzer_cli:pkg/analyzer_cli/lib
12+
args:third_party/pkg/args/lib
13+
async:third_party/pkg/async/lib
14+
async_helper:pkg/async_helper/lib
15+
barback:third_party/pkg/barback/lib
16+
bazel_worker:third_party/pkg/bazel_worker/lib
17+
boolean_selector:third_party/pkg/boolean_selector/lib
18+
browser:pkg/browser/lib
19+
charcode:third_party/pkg/charcode/lib
20+
charted:third_party/observatory_pub_packages/packages/charted/lib
21+
cli_util:third_party/pkg/cli_util/lib
22+
code_transformers:third_party/pkg/code_transformers/lib
23+
collection:third_party/pkg/collection/lib
24+
compiler:pkg/compiler/lib
25+
# Compiler is imported as compiler_unsupported so it can work outside the SDK.
26+
compiler_unsupported:pkg/compiler/lib
27+
convert:third_party/pkg/convert/lib
28+
crypto:third_party/pkg/crypto/lib
29+
csslib:third_party/pkg/csslib/lib
30+
dart2js_incremental:pkg/dart2js_incremental/lib
31+
dart2js_info:third_party/pkg/dart2js_info/lib
32+
dart_messages:pkg/dart_messages/lib
33+
dart_style:third_party/pkg_tested/dart_style/lib
34+
dartdoc:third_party/pkg/dartdoc/lib
35+
dev_compiler:pkg/dev_compiler/lib
36+
expect:pkg/expect/lib
37+
fixnum:third_party/pkg/fixnum/lib
38+
func:third_party/pkg/func/lib
39+
glob:third_party/pkg/glob/lib
40+
html:third_party/pkg/html/lib
41+
http:third_party/pkg/http/lib
42+
http_multi_server:third_party/pkg/http_multi_server/lib
43+
http_parser:third_party/pkg/http_parser/lib
44+
http_throttle:third_party/pkg/http_throttle/lib
45+
initialize:third_party/pkg/initialize/lib
46+
intl:third_party/pkg/intl/lib
47+
isolate:third_party/pkg/isolate/lib
48+
js:pkg/js/lib
49+
js_ast:pkg/js_ast/lib
50+
js_runtime:sdk/lib/_internal/js_runtime/lib
51+
json_rpc_2:third_party/pkg/json_rpc_2/lib
52+
kernel:third_party/pkg/kernel/lib
53+
linter:third_party/pkg/linter/lib
54+
logging:third_party/pkg/logging/lib
55+
lookup_map:pkg/lookup_map/lib
56+
markdown:third_party/pkg/markdown/lib
57+
matcher:third_party/pkg/matcher/lib
58+
meta:pkg/meta/lib
59+
metatest:third_party/pkg/metatest/lib
60+
microlytics:pkg/microlytics/lib
61+
mime:third_party/pkg/mime/lib
62+
mustache4dart:third_party/pkg/mustache4dart/lib
63+
oauth2:third_party/pkg/oauth2/lib
64+
observatory:runtime/observatory/lib
65+
observe:third_party/pkg/observe/lib
66+
package_config:third_party/pkg_tested/package_config/lib
67+
package_resolver:third_party/pkg_tested/package_resolver/lib
68+
path:third_party/pkg/path/lib
69+
petitparser:third_party/pkg/petitparser/lib
70+
plugin:third_party/pkg/plugin/lib
71+
pool:third_party/pkg/pool/lib
72+
protobuf:third_party/pkg/protobuf/lib
73+
pub:third_party/pkg/pub/lib
74+
pub_cache:third_party/pkg/pub_cache/lib
75+
pub_semver:third_party/pkg/pub_semver/lib
76+
quiver:third_party/pkg/quiver/lib
77+
resource:third_party/pkg/resource/lib
78+
scheduled_test:third_party/pkg/scheduled_test/lib
79+
sdk_library_metadata:sdk/lib/_internal/sdk_library_metadata/lib
80+
shelf:third_party/pkg/shelf/lib
81+
shelf_packages_handler:third_party/pkg/shelf_packages_handler/lib
82+
shelf_static:third_party/pkg/shelf_static/lib
83+
shelf_web_socket:third_party/pkg/shelf_web_socket/lib
84+
smoke:third_party/pkg/smoke/lib
85+
source_map_stack_trace:third_party/pkg/source_map_stack_trace/lib
86+
source_maps:third_party/pkg/source_maps/lib
87+
source_span:third_party/pkg/source_span/lib
88+
stack_trace:third_party/pkg/stack_trace/lib
89+
stream_channel:third_party/pkg/stream_channel/lib
90+
string_scanner:third_party/pkg/string_scanner/lib
91+
test:third_party/pkg/test/lib
92+
test_reflective_loader:third_party/pkg/test_reflective_loader/lib
93+
typed_data:third_party/pkg/typed_data/lib
94+
typed_mock:pkg/typed_mock/lib
95+
unittest:third_party/pkg/unittest/lib
96+
usage:third_party/pkg/usage/lib
97+
utf:third_party/pkg/utf/lib
98+
watcher:third_party/pkg/watcher/lib
99+
web_components:third_party/pkg/web_components/lib
100+
web_socket_channel:third_party/pkg/web_socket_channel/lib
101+
when:third_party/pkg/when/lib
102+
which:third_party/pkg/which/lib
103+
yaml:third_party/pkg/yaml/lib

pkg/pkg.gyp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@
2626
],
2727
'outputs': [
2828
'<(SHARED_INTERMEDIATE_DIR)/packages.stamp',
29+
'<(PRODUCT_DIR)/.packages',
2930
],
3031
'action': [
31-
'python', '../tools/make_links.py',
32+
'python', '../tools/make_links.py', '--create-links',
33+
'--create-package-file',
3234
'--timestamp_file=<(SHARED_INTERMEDIATE_DIR)/packages.stamp',
33-
'<(PRODUCT_DIR)/packages',
35+
'<(PRODUCT_DIR)',
3436
'<@(_inputs)',
3537
# Pub imports dart2js as compiler_unsupported so it can work outside
3638
# the SDK. Map that to the compiler package.

runtime/dart-runtime.gyp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@
186186
'target_name': 'runtime_all',
187187
'type': 'none',
188188
'dependencies': [
189-
'../pkg/pkg.gyp:pkg_packages',
190189
'sample_extension',
191190
],
192191
},

runtime/observatory/observatory.gypi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
'type': 'none',
1313
'dependencies': [
1414
'dart_bootstrap#host',
15-
# We use packages for building
16-
'../pkg/pkg.gyp:pkg_packages#target',
1715
],
1816
'toolsets': ['host'],
1917
'actions': [

sdk/bin/dart2js

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -52,41 +52,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
5252

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

55-
if [[ `uname` == 'Darwin' ]]; then
56-
OUT_DIR="$DART_ROOT/xcodebuild/"
57-
else
58-
OUT_DIR="$DART_ROOT/out/"
59-
fi
60-
61-
if [ -z "$DART_CONFIGURATION" ];
62-
then
63-
DIRS=$( ls "$OUT_DIR" )
64-
# list of possible configurations in decreasing desirability
65-
CONFIGS=("ReleaseX64" "ReleaseIA32" "DebugX64" "DebugIA32"
66-
"ReleaseARM" "ReleaseARM64" "ReleaseARMV5TE" "ReleaseMIPS"
67-
"DebugARM" "DebugARM64" "DebugARMV5TE" "DebugMIPS")
68-
DART_CONFIGURATION="None"
69-
for CONFIG in ${CONFIGS[*]}
70-
do
71-
for DIR in $DIRS;
72-
do
73-
if [ "$CONFIG" = "$DIR" ];
74-
then
75-
# choose most desirable configuration that is available and break
76-
DART_CONFIGURATION="$DIR"
77-
break 2
78-
fi
79-
done
80-
done
81-
if [ "$DART_CONFIGURATION" = "None" ]
82-
then
83-
echo "No valid dart configuration found in $OUT_DIR"
84-
exit 1
85-
fi
86-
fi
87-
88-
BUILD_DIR="$OUT_DIR$DART_CONFIGURATION"
89-
90-
PACKAGE_ROOT="$BUILD_DIR/packages/"
91-
92-
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "--package-root=$PACKAGE_ROOT" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@"
55+
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@"

sdk/bin/dart2js.bat

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
3939

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

42-
rem DART_CONFIGURATION defaults to ReleaseX64
43-
if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64
44-
45-
set BUILD_DIR=%DART_ROOT%\out\%DART_CONFIGURATION%
46-
47-
set PACKAGE_ROOT=%BUILD_DIR%\packages
48-
49-
"%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "%DART2JS%" %EXTRA_OPTIONS% %*
42+
"%DART%" %EXTRA_VM_OPTIONS% "%DART2JS%" %EXTRA_OPTIONS% %*
5043

5144
endlocal
5245

sdk/bin/dartanalyzer

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -45,42 +45,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
4545

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

48-
if [[ `uname` == 'Darwin' ]];
49-
then
50-
OUT_DIR="$DART_ROOT/xcodebuild/"
51-
else
52-
OUT_DIR="$DART_ROOT/out/"
53-
fi
54-
55-
if [ -z "$DART_CONFIGURATION" ];
56-
then
57-
DIRS=$( ls "$OUT_DIR" )
58-
# list of possible configurations in decreasing desirability
59-
CONFIGS=("ReleaseX64" "ReleaseIA32" "DebugX64" "DebugIA32"
60-
"ReleaseARM" "ReleaseARM64" "ReleaseARMV5TE" "ReleaseMIPS"
61-
"DebugARM" "DebugARM64" "DebugARMV5TE" "DebugMIPS")
62-
DART_CONFIGURATION="None"
63-
for CONFIG in ${CONFIGS[*]}
64-
do
65-
for DIR in $DIRS;
66-
do
67-
if [ "$CONFIG" = "$DIR" ];
68-
then
69-
# choose most desirable configuration that is available and break
70-
DART_CONFIGURATION="$DIR"
71-
break 2
72-
fi
73-
done
74-
done
75-
if [ "$DART_CONFIGURATION" = "None" ]
76-
then
77-
echo "No valid dart configuration found in $OUT_DIR"
78-
exit 1
79-
fi
80-
fi
81-
82-
BUILD_DIR="$OUT_DIR$DART_CONFIGURATION"
83-
84-
PACKAGE_ROOT="$BUILD_DIR/packages/"
85-
86-
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "--package-root=$PACKAGE_ROOT" "$ANALYZER" "$SDK_ARG" "$@"
48+
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$ANALYZER" "$SDK_ARG" "$@"

sdk/bin/dartanalyzer.bat

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
4040

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

43-
rem DART_CONFIGURATION defaults to ReleaseX64
44-
if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64
45-
46-
set BUILD_DIR=%DART_ROOT%\out\%DART_CONFIGURATION%
47-
48-
set PACKAGE_ROOT=%BUILD_DIR%\packages
49-
50-
"%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "%ANALYZER%" "%SDK_ARG%" %*
43+
"%DART%" %EXTRA_VM_OPTIONS% "%ANALYZER%" "%SDK_ARG%" %*
5144

5245
endlocal
5346

sdk/bin/dartdevc

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -45,42 +45,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
4545

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

48-
if [[ `uname` == 'Darwin' ]];
49-
then
50-
OUT_DIR="$DART_ROOT/xcodebuild/"
51-
else
52-
OUT_DIR="$DART_ROOT/out/"
53-
fi
54-
55-
if [ -z "$DART_CONFIGURATION" ];
56-
then
57-
DIRS=$( ls "$OUT_DIR" )
58-
# list of possible configurations in decreasing desirability
59-
CONFIGS=("ReleaseX64" "ReleaseIA32" "DebugX64" "DebugIA32"
60-
"ReleaseARM" "ReleaseARM64" "ReleaseARMV5TE" "ReleaseMIPS"
61-
"DebugARM" "DebugARM64" "DebugARMV5TE" "DebugMIPS")
62-
DART_CONFIGURATION="None"
63-
for CONFIG in ${CONFIGS[*]}
64-
do
65-
for DIR in $DIRS;
66-
do
67-
if [ "$CONFIG" = "$DIR" ];
68-
then
69-
# choose most desirable configuration that is available and break
70-
DART_CONFIGURATION="$DIR"
71-
break 2
72-
fi
73-
done
74-
done
75-
if [ "$DART_CONFIGURATION" = "None" ]
76-
then
77-
echo "No valid dart configuration found in $OUT_DIR"
78-
exit 1
79-
fi
80-
fi
81-
82-
BUILD_DIR="$OUT_DIR$DART_CONFIGURATION"
83-
84-
PACKAGE_ROOT="$BUILD_DIR/packages/"
85-
86-
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "--package-root=$PACKAGE_ROOT" "$DEV_COMPILER" "$SDK_ARG" "$@"
48+
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$DEV_COMPILER" "$SDK_ARG" "$@"

sdk/bin/dartdevc.bat

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
3636

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

39-
rem DART_CONFIGURATION defaults to ReleaseX64
40-
if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64
41-
42-
set BUILD_DIR=%DART_ROOT%\out\%DART_CONFIGURATION%
43-
44-
set PACKAGE_ROOT=%BUILD_DIR%\packages
45-
46-
"%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "DEV_COMPILER%" "%SDK_ARG%" %*
39+
"%DART%" %EXTRA_VM_OPTIONS% "DEV_COMPILER%" "%SDK_ARG%" %*
4740

4841
endlocal
4942

sdk/bin/dartfmt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
2828

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

31-
if [ -z "$DART_CONFIGURATION" ];
32-
then
33-
DART_CONFIGURATION="ReleaseX64"
34-
fi
35-
36-
if [[ `uname` == 'Darwin' ]]; then
37-
BUILD_DIR="$DART_ROOT/xcodebuild/$DART_CONFIGURATION"
38-
else
39-
BUILD_DIR="$DART_ROOT/out/$DART_CONFIGURATION"
40-
fi
41-
42-
PACKAGE_ROOT="$BUILD_DIR/packages/"
43-
44-
exec "$DART" "--package-root=$PACKAGE_ROOT" "$DARTFMT" "$@"
31+
exec "$DART" "$DARTFMT" "$@"

sdk/bin/dartfmt.bat

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
2727

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

30-
rem DART_CONFIGURATION defaults to ReleaseX64
31-
if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64
32-
33-
set BUILD_DIR=%DART_ROOT%\out\%DART_CONFIGURATION%
34-
35-
set PACKAGE_ROOT=%BUILD_DIR%\packages
36-
37-
"%DART%" "--package-root=%PACKAGE_ROOT%" "%DARTFMT%" %*
30+
"%DART%" "%DARTFMT%" %*
3831

3932
endlocal
4033

sdk/bin/pub

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ fi
7979
# Use the Dart binary in the built SDK so pub can find the version file next
8080
# to it.
8181
DART="$BUILD_DIR/dart-sdk/bin/dart"
82-
PACKAGES_DIR="$BUILD_DIR/packages/"
8382

8483
# Run pub.
8584
PUB="$SDK_DIR/../third_party/pkg/pub/bin/pub.dart"
86-
exec "$DART" "${VM_OPTIONS[@]}" "--package-root=$PACKAGES_DIR" "$PUB" "$@"
85+
exec "$DART" "${VM_OPTIONS[@]}" "$PUB" "$@"

sdk/bin/pub.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ if not "_%DART_VM_OPTIONS%_" == "__" (
3131
rem Use the Dart binary in the built SDK so pub can find the version file next
3232
rem to it.
3333
set BUILD_DIR=%SDK_DIR%\..\out\ReleaseX64
34-
set PACKAGES_DIR=%BUILD_DIR%\packages
3534
set DART=%BUILD_DIR%\dart-sdk\bin\dart
3635

3736
rem Run pub.
3837
set PUB="%SDK_DIR%\..\third_party\pkg\pub\bin\pub.dart"
39-
"%DART%" %VM_OPTIONS% --package-root="%PACKAGES_DIR%" "%PUB%" %*
38+
"%DART%" %VM_OPTIONS% "%PUB%" %*
4039

4140
endlocal
4241

0 commit comments

Comments
 (0)