-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add the missing help messages for some switches #9719
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I agree that getTargetResult
should probably specify that the specified target will be executed.
Thanks, have updated the help message for this property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I've left a few comments inline. For testing, can you please compare the help output before and after, and from both MSBuild.exe and dotnet build?
I upload the text based on test. There is a change in the order of the switches. Please have a look if that is acceptable. -help is earlier than other no parameters switches since the msbuild/src/MSBuild/CommandLineSwitches.cs Lines 204 to 227 in 563c7b0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I upload the text based on test. There is a change in the order of the switches. Please have a look if that is acceptable.
I can't imagine something would depend on the order. Reviewers, please chime in. I've left a few inline comments. Thank you!
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There are conflicts since the new analyzer switch in the commit f744eb5#diff-c0f68f9abf837e0ecb1e4de52b83e9e81d6934c5596bc213e4b1de45e591d7ce But there is no help message for this analyzer switch. @JanKrivanek , Could you give more info about this switch? Should we show the help message for this switch? |
Disccussed offline. |
<value> -terminalLoggerParameters: <parameters> | ||
Parameters for the TerminalLogger. (Short form: -tlp) | ||
default parameter. | ||
- `on`, `true` forces TerminalLogger to be used even when | ||
it would be disabled. | ||
- `off`, `false` forces TerminalLogger to not be used even | ||
when it would be enabled. | ||
- `auto` enables TerminalLogger when the terminal supports | ||
it and the session doesn't have redirected stdout/stderr | ||
|
||
Example: | ||
-terminalLoggerParameters:default=auto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems not complete. This is what we support based on code:
msbuild/src/MSBuild/TerminalLogger/TerminalLogger.cs
Lines 309 to 318 in 9ead13b
switch (parameterName.ToUpperInvariant()) | |
{ | |
case "V": | |
case "VERBOSITY": | |
ApplyVerbosityParameter(parameterValue); | |
break; | |
case "SHOWCOMMANDLINE": | |
TryApplyShowCommandLineParameter(parameterValue); | |
break; | |
} |
in addition to
Lines 2826 to 2827 in 9ead13b
// Find default configuration so it is part of telemetry even when default is not used. | |
// Default can be stored in /tlp:default=true|false|on|off|auto |
So basicaly the parameters is a semicolon separated list - par1;par2;par3...
, where each parameter is either in a form of setting=value
or just setting
The settings currently can be:
- default - requires value
- v|verbosity - requires value
- ShowCommandline - just setting, value must not be specified
Please ping me once you have formulation of this section that incorporates the above and I'll have a look and signoff or object :)
Fixes #9710
Context
Some of the supported command line switches are not mentioned in the help message
Changes Made
List the relevant string resource ID in s_parameterlessSwitchesMap / s_parameterizedSwitchesMap. And iterate the resource ids in the ShowHelpMessage
Testing
Before:
msbuildBefore.txt
dotnetmsbuildBefore.txt
After:
msbuildAfter.txt
netMSBuildAfter.txt
Notes