Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Side by Side Diff: sdk/bin/dart2analyzer

Issue 16667023: Fixed sdk/bin/dart2analyzer to use package-root (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash --posix 1 #!/bin/bash --posix
2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 # NOTE: This file is not supposed to be included in the SDK.
ricow1 2013/06/11 10:35:34 So why don't we move it?
kustermann 2013/06/11 10:38:29 Sure. Where should we move it to?
scheglov 2013/06/11 20:07:53 For now yes, this file should not be included in t
ricow1 2013/06/12 07:54:22 OK - for future reference please only place stuff
scheglov 2013/06/12 08:47:43 OK, agree. Lets move it to the appropriate place
7 # It is currently only used by test.dart for testing pkg/analyzer_experimental.
8
6 set -e 9 set -e
7 10
8 BIN_DIR="$(cd "${BASH_SOURCE%/*}" ; pwd -P)" 11 CUR_DIR="$(cd "${BASH_SOURCE%/*}" ; pwd -P)"
9 SDK_DIR="$(cd "${BIN_DIR}/.." ; pwd -P)"
10 DART="$BIN_DIR/dart"
11 PKG_ANALYZER="$BIN_DIR/../packages/analyzer_experimental/bin/analyzer.dart"
12 12
13 FOUND_BATCH=0 13 if [ -z "$DART_CONFIGURATION" ];
14 then
15 DART_CONFIGURATION="ReleaseIA32"
16 fi
17
18 if [[ `uname` == 'Darwin' ]];
19 then
20 BUILD_DIR="$CUR_DIR"/../../xcodebuild/$DART_CONFIGURATION
21 else
22 BUILD_DIR="$CUR_DIR"/../../out/$DART_CONFIGURATION
23 fi
24
25 DART_ROOT="$(cd "${CUR_DIR}/../.." ; pwd -P)"
26 SDK_DIR="$(cd "${DART_ROOT}/sdk" ; pwd -P)"
27 PKG_ANALYZER="$DART_ROOT/pkg/analyzer_experimental/bin/analyzer.dart"
28 PACKAGE_ROOT="$DART_ROOT/out/$DART_CONFIGURATION/packages/"
29
14 FOUND_SDK=0 30 FOUND_SDK=0
15 for ARG in "$@" 31 for ARG in "$@"
16 do 32 do
17 case $ARG in 33 case $ARG in
18 -batch|--batch)
19 FOUND_BATCH=1
20 ;;
21 --dart-sdk) 34 --dart-sdk)
22 FOUND_SDK=1 35 FOUND_SDK=1
23 ;; 36 ;;
24 *) 37 *)
25 ;; 38 ;;
26 esac 39 esac
27 done 40 done
28 41
29 if [ $FOUND_SDK = 0 ] ; then 42 if [ $FOUND_SDK = 0 ] ; then
30 exec "$DART" "${PKG_ANALYZER}" --dart-sdk "${SDK_DIR}" "$@" 43 exec "$BUILD_DIR/dart" "--package-root=$PACKAGE_ROOT" "${PKG_ANALYZER}" --dart -sdk "${SDK_DIR}" "$@"
kustermann 2013/06/11 10:28:15 Which script passes a boolean '--dart-sdk' flag to
scheglov 2013/06/11 20:07:53 In general, this is script which users may call to
ricow1 2013/06/12 07:54:22 What does that flag do?
scheglov 2013/06/12 08:47:43 It allows to analyze against different SDK than SD
31 else 44 else
32 exec "$DART" "${PKG_ANALYZER}" "$@" 45 exec "$BUILD_DIR/dart" "--package-root=$PACKAGE_ROOT" "${PKG_ANALYZER}" "$@"
kustermann 2013/06/11 10:28:15 I have no idea how worked without '--package-root'
ricow1 2013/06/11 10:35:34 Did it?
kustermann 2013/06/11 10:38:29 It didn't work on my machine. But I expected that
ricow1 2013/06/12 07:54:22 Konstantin: how are you setting the package root w
scheglov 2013/06/12 08:47:43 It seems that it worked only on my machine :-( I
33 fi 46 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698