Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow turning detailed summary off #6338

Merged
merged 2 commits into from Apr 20, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Build/BackEnd/Components/Scheduler/IScheduler.cs
Expand Up @@ -66,7 +66,7 @@ internal interface IScheduler : IBuildComponent
void Reset();

/// <summary>
/// Writes a detailed summary of the build state which includes informaiton about the scheduling plan.
/// Writes a detailed summary of the build state which includes information about the scheduling plan.
/// </summary>
void WriteDetailedSummary(int submissionId);

Expand Down
19 changes: 14 additions & 5 deletions src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs
Expand Up @@ -346,13 +346,22 @@ public void VerbositySwitchIdentificationTests(string verbosity)
[InlineData("detailedsummary")]
[InlineData("DETAILEDSUMMARY")]
[InlineData("DetailedSummary")]
public void DetailedSummarySwitchIndentificationTests(string detailedsummary)
public void DetailedSummarySwitchIdentificationTests(string detailedsummary)
{
CommandLineSwitches.ParameterlessSwitch parameterlessSwitch;
string duplicateSwitchErrorMessage;
CommandLineSwitches.IsParameterlessSwitch(detailedsummary, out parameterlessSwitch, out duplicateSwitchErrorMessage).ShouldBeTrue();
parameterlessSwitch.ShouldBe(CommandLineSwitches.ParameterlessSwitch.DetailedSummary);
CommandLineSwitches.IsParameterizedSwitch(
detailedsummary,
out var parameterizedSwitch,
out var duplicateSwitchErrorMessage,
out var multipleParametersAllowed,
out var missingParametersErrorMessage,
out var unquoteParameters,
out var emptyParametersAllowed).ShouldBeTrue();
parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.DetailedSummary);
duplicateSwitchErrorMessage.ShouldBeNull();
multipleParametersAllowed.ShouldBe(false);
missingParametersErrorMessage.ShouldBeNull();
unquoteParameters.ShouldBe(true);
emptyParametersAllowed.ShouldBe(false);
}

[Theory]
Expand Down
6 changes: 3 additions & 3 deletions src/MSBuild/CommandLineSwitches.cs
Expand Up @@ -46,7 +46,6 @@ internal enum ParameterlessSwitch
OldOM,
#endif
DistributedFileLogger,
DetailedSummary,
#if DEBUG
WaitForDebugger,
#endif
Expand Down Expand Up @@ -104,6 +103,7 @@ internal enum ParameterizedSwitch
InputResultsCaches,
OutputResultsCache,
LowPriority,
DetailedSummary,
NumberOfParameterizedSwitches,
}

Expand Down Expand Up @@ -221,7 +221,6 @@ bool emptyParametersAllowed
new ParameterlessSwitchInfo( new string[] { "oldom" }, ParameterlessSwitch.OldOM, null),
#endif
new ParameterlessSwitchInfo( new string[] { "distributedfilelogger", "dfl" }, ParameterlessSwitch.DistributedFileLogger, null),
new ParameterlessSwitchInfo( new string[] { "detailedsummary", "ds" }, ParameterlessSwitch.DetailedSummary, null),
#if DEBUG
new ParameterlessSwitchInfo( new string[] { "waitfordebugger", "wfd" }, ParameterlessSwitch.WaitForDebugger, null),
#endif
Expand Down Expand Up @@ -269,10 +268,11 @@ bool emptyParametersAllowed
new ParameterizedSwitchInfo( new string[] { "restoreproperty", "rp" }, ParameterizedSwitch.RestoreProperty, null, true, "MissingRestorePropertyError", true, false ),
new ParameterizedSwitchInfo( new string[] { "interactive" }, ParameterizedSwitch.Interactive, null, false, null, true, false ),
new ParameterizedSwitchInfo( new string[] { "isolateprojects", "isolate" }, ParameterizedSwitch.IsolateProjects, null, false, null, true, false ),
new ParameterizedSwitchInfo( new string[] { "graphbuild", "graph" }, ParameterizedSwitch.GraphBuild, null, true, null, true, false ),
new ParameterizedSwitchInfo( new string[] { "graphbuild", "graph" }, ParameterizedSwitch.GraphBuild, null, true, null, true, false ),
new ParameterizedSwitchInfo( new string[] { "inputResultsCaches", "irc" }, ParameterizedSwitch.InputResultsCaches, null, true, null, true, true ),
new ParameterizedSwitchInfo( new string[] { "outputResultsCache", "orc" }, ParameterizedSwitch.OutputResultsCache, "DuplicateOutputResultsCache", false, null, true, true ),
new ParameterizedSwitchInfo( new string[] { "lowpriority", "low" }, ParameterizedSwitch.LowPriority, null, false, null, true, false ),
new ParameterizedSwitchInfo( new string[] { "detailedsummary", "ds" }, ParameterizedSwitch.DetailedSummary, null, false, null, true, false ),
};

/// <summary>
Expand Down
15 changes: 14 additions & 1 deletion src/MSBuild/Resources/Strings.resx
Expand Up @@ -601,12 +601,16 @@ Copyright (C) Microsoft Corporation. All rights reserved.
</value>
</data>
<data name="HelpMessage_26_DetailedSummarySwitch">
<value> -detailedSummary
<value> -detailedSummary[:True|False]
Shows detailed information at the end of the build
about the configurations built and how they were
scheduled to nodes.
(Short form: -ds)
</value>
<comment>
LOCALIZATION: "detailedSummary", "True" and "False" should not be localized.
LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars.
</comment>
</data>
<data name="HelpMessage_28_WarnAsErrorSwitch" UESanitized="false" Visibility="Public">
<value> -warnAsError[:code[;code2]]
Expand Down Expand Up @@ -1180,6 +1184,15 @@ Copyright (C) Microsoft Corporation. All rights reserved.
LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized.
</comment>
</data>
<data name="InvalidDetailedSummaryValue" UESanitized="true" Visibility="Public">
<value>MSBUILD : error MSB1061: Detailed summary value is not valid. {0}</value>
<comment>
{StrBegin="MSBUILD : error MSB1061: "}
UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg.
This error is shown when a user specifies a value for the -detailedSummary parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString.
LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized.
</comment>
</data>
<data name="AbortingBuild" UESanitized="true" Visibility="Public">
<value>Attempting to cancel the build...</value>
</data>
Expand Down
19 changes: 16 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.en.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.