Skip to content

Commit be1d63b

Browse files
committed
parallel runs are not supported for baselines
1 parent 7f9038b commit be1d63b

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/ModVerify.CliApp/Settings/CommandLine/BaseModVerifyOptions.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System.Collections.Generic;
2-
using AET.ModVerify.Reporting;
1+
using AET.ModVerify.Reporting;
32
using CommandLine;
43
using PG.StarWarsGame.Engine;
54

@@ -52,12 +51,6 @@ internal abstract class BaseModVerifyOptions
5251
"Multiple paths can be separated using the platform-specific path separator (';' on Windows, ':' on Linux).")]
5352
public string? AdditionalFallbackPath { get; init; }
5453

55-
// TODO: Should not be supported for creating baselines, because we want deterministic baselines.
56-
[Option("parallel", Default = false,
57-
HelpText = "When set, game verifiers will run in parallel. " +
58-
"While this may reduce analysis time, console output might be harder to read.")]
59-
public bool Parallel { get; init; }
60-
6154
[Option("baseline", Required = false,
6255
HelpText = "Path(s) to one or more JSON baseline files. Multiple paths can be separated using the platform-specific path separator (';' on Windows, ':' on Linux). " +
6356
"For 'verify' this is mutually exclusive with --searchBaseline. May be combined with --useDefaultBaseline.")]

src/ModVerify.CliApp/Settings/CommandLine/VerifyVerbOption.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,10 @@ internal sealed class VerifyVerbOption : BaseModVerifyOptions
2727
HelpText = "When this flag is present, the application will not report engine assertions.")]
2828
public bool IgnoreAsserts { get; init; }
2929

30+
[Option("parallel", Default = false,
31+
HelpText = "When set, game verifiers will run in parallel. " +
32+
"While this may reduce analysis time, console output might be harder to read.")]
33+
public bool Parallel { get; init; }
34+
3035
public bool IsRunningWithoutArguments { get; init; }
3136
}

src/ModVerify.CliApp/Settings/SettingsBuilder.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ private AppBaselineSettings BuildFromCreateBaselineVerb(CreateBaselineVerbOption
9292
{
9393
VerifierServiceSettings = new VerifierServiceSettings
9494
{
95-
ParallelVerifiers = baselineVerb.Parallel ? 4 : 1,
95+
// Always sequential: baseline creation must be deterministic — error ordering
96+
// and any other parallelism-sensitive behavior would otherwise vary between runs.
97+
ParallelVerifiers = 1,
9698
VerifiersProvider = new DefaultGameVerifiersProvider(),
9799
GameVerifySettings = GameVerifySettings.Default,
98100
FailFastSettings = FailFastSetting.NoFailFast,

0 commit comments

Comments
 (0)