Skip to content

Update System.CommandLine - #23085

Merged
baronfel merged 20 commits into
dotnet:mainfrom
baronfel:scl-update
Jan 8, 2022
Merged

baronfel merged 20 commits into
dotnet:mainfrom
baronfel:scl-update

Conversation

@baronfel

Copy link
Copy Markdown
Member

This updates our version of System.CommandLine to the latest available and adjusts to some API breaking changes around:

  • Completions
  • Binding Handlers to Commands
  • Help Layout

The vast majority of the existing tests pass on my machine, I've created this to

  • get CI verification
  • get initial feedback on the approach
  • determine where we should target this

@ghost

ghost commented Dec 15, 2021

Copy link
Copy Markdown

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.

@baronfel

baronfel commented Dec 16, 2021 •

Copy link
Copy Markdown
Member Author

There are two categories of test failures:

  • failures to download/install the mono-wasm optional workload (not sure if these are related to this changeset)
  • failures on testing empty arguments (definitely related to this changeset)

I logged an issue upstream with S.CL to discuss the second category.

@pranavkm
pranavkm requested review from a team and donJoseLuis as code owners December 16, 2021 22:48
Comment on lines +140 to +141
new[] { "--no-hot-reload" },
"Suppress hot reload for supported apps.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
new[] { "--no-hot-reload" },
"Suppress hot reload for supported apps.");
new[] { "--no-hot-reload" },
"Suppress hot reload for supported apps.");

@baronfel

Copy link
Copy Markdown
Member Author

Thanks for the style/consistency review @pranavkm, I'll get right on those changes.

Comment thread eng/Versions.props Resolved

@pranavkm pranavkm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

dotnet-watch changes look good to me.

Comment thread eng/Versions.props Resolved
Comment thread src/Cli/dotnet/CommonOptions.cs Resolved
Comment thread eng/Version.Details.xml Resolved

@MichaelSimons MichaelSimons left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM from a source-build perspective.

@pranavkm

pranavkm commented Jan 5, 2022

Copy link
Copy Markdown
Contributor

@baronfel could you cherry-pick this commit: 1f47a38? It fixes the failing blazor tests - see #23254.

@baronfel

baronfel commented Jan 5, 2022

Copy link
Copy Markdown
Member Author

@pranavkm done, thank you!

@baronfel

baronfel commented Jan 5, 2022 •

Copy link
Copy Markdown
Member Author

Some of the completion tests are failing because the update introduced a regression around completions for global options: dotnet/command-line-api#1563. There are two kinds of test failures remaining:

  • there's some oddity around the name of the commandFile some project manipulation tests
  • some msbuild tests are getting a distributed logger option forwarded unexpectedly

still digging in to both of those categories of error.

@baronfel

baronfel commented Jan 5, 2022

Copy link
Copy Markdown
Member Author

Feeling pretty happy about this now: the main tests failing in CI now are the completions ones, and S.CL already has an MR out to fix that. Hopefully we can get green in the next day or so.

@pranavkm

pranavkm commented Jan 5, 2022

Copy link
Copy Markdown
Contributor

@baronfel I noticed this when I was looking at the blazor test failures - it looks like the CommandHandler type exists in a separate assembly: https://github.com/dotnet/command-line-api/blob/main/src/System.CommandLine.NamingConventionBinder/CommandHandler.cs. Did you intentionally choose to avoid that reference? It might have been less churn.

@baronfel

baronfel commented Jan 5, 2022

Copy link
Copy Markdown
Member Author

@pranavkm I did intentionally avoid taking on that reference, mostly because it introduces a reflection component. The base library was mostly expressive enough IMO (at least for the core SDK commands), and being more linker-friendly seemed like a good secondary goal as well. I'm not hard-against it, I just didn't see a compelling enough reason to require it.

@baronfel

baronfel commented Jan 6, 2022

Copy link
Copy Markdown
Member Author

Rebased and updated S.CL to fix the completions errors. Fingers crossed, this could be the one!

@baronfel

baronfel commented Jan 6, 2022

Copy link
Copy Markdown
Member Author

All green, this was a fun one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants