connectUnchecked static method

Future<BuildDaemonClient> connectUnchecked(
  1. String workingDirectory, {
  2. Serializers? serializersOverride,
  3. void logHandler(
    1. ServerLog
    )?,
})

Connects to the current daemon instance.

Does not check the options the daemon is running with, so this is primarily useful in tests where the daemon has just been launched.

To connect and check the options, use connect.

Implementation

static Future<BuildDaemonClient> connectUnchecked(
  String workingDirectory, {
  Serializers? serializersOverride,
  void Function(ServerLog)? logHandler,
}) async {
  logHandler ??= (_) {};
  final daemonSerializers = serializersOverride ?? serializers;
  return BuildDaemonClient._(
    await _existingPort(workingDirectory),
    daemonSerializers,
    logHandler,
  );
}