blob: 6b1c061e6575dc9b86944a28fe948a83e2c0da43 [file] [log] [blame]
// Copyright (c) 2017, 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.
import 'dart:io';
import 'package:bazel_worker/driver.dart';
import 'package:cli_util/cli_util.dart' as cli_util;
import 'package:path/path.dart' as p;
String get _scriptExtension => Platform.isWindows ? '.bat' : '';
/// Manages a shared set of persistent analyzer workers.
final analyzerDriver = new BazelWorkerDriver(() => Process.start(
p.join(sdkDir.path, 'bin', 'dartanalyzer$_scriptExtension'),
['--build-mode', '--persistent_worker']));
/// Manages a shared set of persistent dartdevc workers.
final dartdevcDriver = new BazelWorkerDriver(() => Process.start(
p.join(sdkDir.path, 'bin', 'dartdevc$_scriptExtension'),
['--persistent_worker']));
final sdkDir = cli_util.getSdkDir();