Skip to content

Conversation

@pranavkm
Copy link
Contributor

Contributes to dotnet/designs#229

@ghost
Copy link

ghost commented Jun 17, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@pranavkm pranavkm requested a review from dsplaisted June 17, 2021 23:44
root.TreatUnmatchedTokensAsErrors = false;
root.Handler = CommandHandler.Create((CommandLineOptions options, ParseResult parseResults) =>
{
if (!string.IsNullOrEmpty(parseResults.ValueForOption<string>("-p")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how the command line parsing works here. Have you validated that if --project is used, the warning isn't printed (since they are both the same Option)? Should we have an automated test for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. It prints a warning in either case.

{
if (!string.IsNullOrEmpty(parseResults.ValueForOption<string>("-p")))
{
reporter.Warn(Resources.Warning_ProjectAbbreviationDeprecated);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this actually look like in the console output? It looks like we're going to go with the following (in yellow text) for dotnet run:

Warning NETSDKNNNN: The abbreviation of -p for --project is deprecated. Please use --project.

Where NNNN is replaced with an SDK error code, so you can better search for information about the error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's what this looks like now sans the SDK error code:

image

Have you decided on what the error code is?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NETSDK1174 - #18301

@pranavkm pranavkm enabled auto-merge (squash) June 18, 2021 18:26
@pranavkm pranavkm merged commit 0f1b3a0 into release/6.0.1xx-preview6 Jun 18, 2021
@pranavkm pranavkm deleted the prkrishn/dotnet-watch branch August 31, 2021 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants