Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Simplify watcher arguments proposal #105

Closed
victorhurdugaci opened this issue May 23, 2016 · 8 comments
Closed

Simplify watcher arguments proposal #105

victorhurdugaci opened this issue May 23, 2016 · 8 comments

Comments

@victorhurdugaci
Copy link
Contributor

victorhurdugaci commented May 23, 2016

Proposed changes:

  • Remove --exit-on-change (confirmed that it's not used by anyone internally)
  • Remove --command
  • All arguments are passed to dotnet (except --help. That's special and shows watcher help).

Examples:

  • I want to show help
    • Before: dotnet watch --help
    • After: dotnet watch or dotnet watch --help
  • I want to run dotnet run
    • Before: dotnet watch or dotnet watch --command run --
    • After: dotnet watch run
  • I want to run dotnet run -- --arg1 value
    • Before dotnet watch --arg1 value or dotnet watch --command run -- -- --arg1 value (yes, double --)
    • After: dotnet watch run -- --arg1 value
  • I want to run dotnet run --framework net451 --
    • Before: dotnet watch --command run -- --framework net451 --
    • After: dotnet watch run --framework net451 --
  • I want to run dotnet test
    • Before: dotnet watch --command test --
    • After: dotnet watch test
  • I want to rundotnet test -parallel none
    • Before: dotnet watch --command test -- -parallel none
    • After: dotnet watch test -parallel none

Pros:

  • You don't need to learn special syntax for watch. Just add watch after dotnet. So dotnet <args> becomes dotnet watch <args>
  • No more confusion about what gets passed to dotnet watch

Cons:

  • dotnet watch shows help.
  • You need to specify run if you want dotnet run
  • You cannot pass --help to the app being watched

cc @glennc

@moozzyk
Copy link
Contributor

moozzyk commented May 23, 2016

I want to run dotnet run
Before: dotnet watch or dotnet watch --command run --
After: dotnet run

Shouldn't after be dotnet watch run or dotnet watch?

@victorhurdugaci
Copy link
Contributor Author

Yes, fixed :)

@victorhurdugaci
Copy link
Contributor Author

@Eilon and @glennc what do you think about doing this now?

@rondefreitas
Copy link

I would propose that dotnet watch with no arguments should still execute dotnet run, as this feels a bit more like other watchers. (even though they require explicit configuration).

@victorhurdugaci
Copy link
Contributor Author

That's a tricky one because dotnet watch would run dotnet run while dotnet watch --foo would run dotnet --foo. I think most folks would expect dotnet --foo to be dotnet run --foo in that case.

@Eilon
Copy link
Member

Eilon commented May 25, 2016

Done?

@victorhurdugaci
Copy link
Contributor Author

Done :)

@Eilon
Copy link
Member

Eilon commented May 25, 2016

4-Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants