Commit 34a67329 authored by Devon Carew's avatar Devon Carew

use --no-precompile (#3175)

* use --no-precompile

* use the flutter bin cache's sdk
parent f697f58c
......@@ -207,7 +207,7 @@ class _AnsiStatus extends Status {
_AnsiStatus(this.message) {
stopwatch = new Stopwatch()..start();
stdout.write('${message.padRight(40)} ');
stdout.write('${message.padRight(44)} ');
stdout.write('${_progress[0]}');
timer = new Timer.periodic(new Duration(milliseconds: 100), _callback);
......
......@@ -6,6 +6,9 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:path/path.dart' as path;
import '../dart/sdk.dart';
import '../globals.dart';
typedef String StringConverter(String string);
......@@ -91,7 +94,7 @@ String runSync(List<String> cmd, { String workingDirectory }) {
/// Return the platform specific name for the given Dart SDK binary. So, `pub`
/// ==> `pub.bat`.
String sdkBinaryName(String name) {
return Platform.isWindows ? '$name.bat' : name;
return path.absolute(path.join(dartSdkPath, 'bin', Platform.isWindows ? '$name.bat' : name));
}
bool exitsHappy(List<String> cli) {
......
......@@ -56,7 +56,8 @@ class UpdatePackagesCommand extends FlutterCommand {
count += await _runPub(new Directory("${ArtifactStore.flutterRoot}/examples"), upgrade: upgrade);
count += await _runPub(new Directory("${ArtifactStore.flutterRoot}/dev"), upgrade: upgrade);
printStatus('Ran "pub" $count time${count == 1 ? "" : "s"} in ${timer.elapsedMilliseconds} ms');
double seconds = timer.elapsedMilliseconds / 1000.0;
printStatus('\nRan \'pub\' $count time${count == 1 ? "" : "s"} in ${seconds.toStringAsFixed(1)}s.');
return 0;
} on int catch (code) {
......
......@@ -7,6 +7,7 @@ import 'dart:io';
import 'package:path/path.dart' as path;
import '../base/logger.dart';
import '../base/process.dart';
import '../globals.dart';
......@@ -31,11 +32,12 @@ Future<int> pubGet({
if (!checkLastModified || !dotPackages.existsSync() || pubSpecYaml.lastModifiedSync().isAfter(dotPackages.lastModifiedSync())) {
String command = upgrade ? 'upgrade' : 'get';
printStatus("Running 'pub $command' in $directory${Platform.pathSeparator}...");
Status status = logger.startProgress("Running 'pub $command' in ${path.basename(directory)}...");
int code = await runCommandAndStreamOutput(
<String>[sdkBinaryName('pub'), '--verbosity=warning', command, '--no-package-symlinks'],
<String>[sdkBinaryName('pub'), '--verbosity=warning', command, '--no-package-symlinks', '--no-precompile'],
workingDirectory: directory
);
status.stop(showElapsedTime: true);
if (code != 0)
return code;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment