-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make dotnet project convert
interactive
#49660
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
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.
Pull Request Overview
This PR makes dotnet project convert
interactive by adding a --keep-source
option and prompting users to confirm or specify output when not provided.
- Introduces shared
InteractiveConsole
helpers and an interactive option in common options. - Adds
KeepSourceOption
and wires interactive logic into the parser and command implementation. - Updates shell completions, tests, and localization/resx to cover the new interactive behavior.
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/Cli/dotnet/InteractiveConsole.cs | New helper for interactive prompts (Confirm/Ask) |
src/Cli/dotnet/CommonOptions.cs | Cache and expose a reusable --interactive option |
src/Cli/dotnet/Commands/Project/Convert/ProjectConvertCommandParser.cs | Add --keep-source option |
src/Cli/dotnet/Commands/Project/Convert/ProjectConvertCommand.cs | Implement interactive flow and copy/move logic for keep-source |
test/dotnet.Tests/CompletionTests/snapshots/.verified. | Update zsh/bash/pwsh completion snapshots for new options |
test/dotnet.Tests/CommandTests/Project/Convert/DotnetProjectConvertTests.cs | Add and update tests for --keep-source and interactive cases |
src/Cli/dotnet/Commands/CliCommandStrings.resx | Add new CLI string entries for interactive prompts |
src/Cli/dotnet/Commands/xlf/CliCommandStrings.*.xlf | Add localization entries for interactive prompts |
Comments suppressed due to low confidence (2)
test/dotnet.Tests/CompletionTests/snapshots/zsh/DotnetCliSnapshotTests.VerifyCompletions.verified.zsh:678
- Zsh completion suggests capitalized
False
/True
, but the CLI expects lowercasefalse
/true
. Update to suggest lowercase values to match actual accepted arguments.
'--keep-source=[Whether to keep source files intact (otherwise, they are deleted after conversion).]: :((False\:"False" True\:"True" ))' \
test/dotnet.Tests/CompletionTests/snapshots/bash/DotnetCliSnapshotTests.VerifyCompletions.verified.sh:1190
- Bash completion suggests
False
/True
but the--keep-source
option expects lowercasefalse
/true
, so the suggestions should be updated accordingly.
COMPREPLY=( $(compgen -W "False True" -- "$cur") )
Amazing, I was genuinely going to ask for this but thought.. "it's the wrong point in the dev cycle..it's out of left field..etc." Then suddenly here it is. |
And allow users to specify whether the files should be copied or moved.
Resolves #49624.