Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// Set of flags and options passed to the compiler | 5 /// Set of flags and options passed to the compiler |
| 6 library dev_compiler.src.options; | 6 library dev_compiler.src.options; |
| 7 | 7 |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:args/args.dart'; | 10 import 'package:args/args.dart'; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 ignoreTypes: args['ignore-types'], | 304 ignoreTypes: args['ignore-types'], |
| 305 wrapClosures: args['wrap-closures'], | 305 wrapClosures: args['wrap-closures'], |
| 306 outputDart: args['dart-gen'], | 306 outputDart: args['dart-gen'], |
| 307 outputDir: outputDir, | 307 outputDir: outputDir, |
| 308 covariantGenerics: args['covariant-generics'], | 308 covariantGenerics: args['covariant-generics'], |
| 309 relaxedCasts: args['relaxed-casts'], | 309 relaxedCasts: args['relaxed-casts'], |
| 310 useColors: useColors, | 310 useColors: useColors, |
| 311 useMultiPackage: args['use-multi-package'], | 311 useMultiPackage: args['use-multi-package'], |
| 312 packageRoot: args['package-root'], | 312 packageRoot: args['package-root'], |
| 313 packagePaths: args['package-paths'].split(','), | 313 packagePaths: args['package-paths'].split(','), |
| 314 resources: args['resources'].split(','), | 314 resources: args['resources'] |
| 315 .split(',') | |
| 316 .where((s) => s.isNotEmpty) | |
| 317 .toList(), | |
|
vsm
2015/05/29 19:32:32
Before, we had [''] - which caused one bogus resou
| |
| 315 inferDownwards: args['infer-downwards'], | 318 inferDownwards: args['infer-downwards'], |
| 316 inferFromOverrides: args['infer-from-overrides'], | 319 inferFromOverrides: args['infer-from-overrides'], |
| 317 inferTransitively: args['infer-transitively'], | 320 inferTransitively: args['infer-transitively'], |
| 318 onlyInferConstsAndFinalFields: args['infer-only-finals'], | 321 onlyInferConstsAndFinalFields: args['infer-only-finals'], |
| 319 nonnullableTypes: optionsToList(args['nonnullable'], | 322 nonnullableTypes: optionsToList(args['nonnullable'], |
| 320 defaultValue: TypeOptions.NONNULLABLE_TYPES), | 323 defaultValue: TypeOptions.NONNULLABLE_TYPES), |
| 321 help: args['help'], | 324 help: args['help'], |
| 322 useMockSdk: args['mock-sdk'], | 325 useMockSdk: args['mock-sdk'], |
| 323 dartSdkPath: sdkPath, | 326 dartSdkPath: sdkPath, |
| 324 logLevel: logLevel, | 327 logLevel: logLevel, |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 457 // The pub-cache directory is two levels up, but we verify that the layout | 460 // The pub-cache directory is two levels up, but we verify that the layout |
| 458 // looks correct. | 461 // looks correct. |
| 459 if (path.basename(dir) != 'dev_compiler') return null; | 462 if (path.basename(dir) != 'dev_compiler') return null; |
| 460 dir = path.dirname(dir); | 463 dir = path.dirname(dir); |
| 461 if (path.basename(dir) != 'global_packages') return null; | 464 if (path.basename(dir) != 'global_packages') return null; |
| 462 dir = path.dirname(dir); | 465 dir = path.dirname(dir); |
| 463 return path.join(dir, cacheDir, 'lib', 'runtime'); | 466 return path.join(dir, cacheDir, 'lib', 'runtime'); |
| 464 } | 467 } |
| 465 return null; | 468 return null; |
| 466 } | 469 } |
| OLD | NEW |