Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
416 changes: 155 additions & 261 deletions .github/workflows/dart.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build_daemon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Bump the min SDK to 3.7.0.
- Remove unused dep: `analyzer`.
- Add `connectUnchecked` for use in tests.

## 4.0.4

Expand Down
25 changes: 23 additions & 2 deletions build_daemon/lib/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ class BuildDaemonClient {

/// Connects to the current daemon instance.
///
/// The options of the running daemon are checked against [daemonCommand].
/// If there is a mismatch, an exception is thrown.
///
/// If one is not running, a new daemon instance will be started.
static Future<BuildDaemonClient> connect(
String workingDirectory,
Expand All @@ -180,8 +183,6 @@ class BuildDaemonClient {
BuildMode buildMode = BuildMode.Auto,
}) async {
logHandler ??= (_) {};
final daemonSerializers = serializersOverride ?? serializers;

final daemonArgs = daemonCommand.sublist(1)
..add('--$buildModeFlag=$buildMode');

Expand All @@ -196,6 +197,26 @@ class BuildDaemonClient {

await _handleDaemonStartup(process, logHandler);

return connectUnchecked(
workingDirectory,
serializersOverride: serializersOverride,
logHandler: logHandler,
);
}

/// 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].
static Future<BuildDaemonClient> connectUnchecked(
String workingDirectory, {
Serializers? serializersOverride,
void Function(ServerLog)? logHandler,
}) async {
logHandler ??= (_) {};
final daemonSerializers = serializersOverride ?? serializers;
return BuildDaemonClient._(
await _existingPort(workingDirectory),
daemonSerializers,
Expand Down
8 changes: 5 additions & 3 deletions build_runner/dart_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ presets:
include_tags: experiments

tags:
slow:
timeout: 16x
integration:
integration1:
timeout: 4x
integration2:
timeout: 4x
integration3:
timeout: 4x
experiments:
skip: 'Only ran if `-P experiments` is passed'
Expand Down
18 changes: 10 additions & 8 deletions build_runner/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ stages:
- format
- analyze: --fatal-infos .
- unit_test:
- test: -x integration -x slow --test-randomize-ordering-seed=random
- test: -x integration1 -x integration2 -x integration3 --test-randomize-ordering-seed=random
- test: -P experiments --test-randomize-ordering-seed=random
- test: -t integration --test-randomize-ordering-seed=random
- test: -t integration1 --test-randomize-ordering-seed=random
os:
- linux
- windows
- test: -t integration2 --test-randomize-ordering-seed=random
os:
- linux
- windows
- test: -t integration3 --test-randomize-ordering-seed=random
os:
- linux
- windows
- leak_check:
- command: ../tool/leak_check.sh
- e2e_test:
- test: -t slow --total-shards 5 --shard-index 0 --test-randomize-ordering-seed=random -j 1
- test: -t slow --total-shards 5 --shard-index 1 --test-randomize-ordering-seed=random -j 1
- test: -t slow --total-shards 5 --shard-index 2 --test-randomize-ordering-seed=random -j 1
- test: -t slow --total-shards 5 --shard-index 3 --test-randomize-ordering-seed=random -j 1
- test: -t slow --total-shards 5 --shard-index 4 --test-randomize-ordering-seed=random -j 1
Loading
Loading