-
Notifications
You must be signed in to change notification settings - Fork 74
Port CLI tools to be global tools [Breaking change] #370
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 to me. It's missing the dev-certs rename.
I decided to keep the rename separate from the global-tool conversion: #371 |
cc @bricelam for dotnet-ef |
f00cd01
to
440630f
Compare
We need to discuss the breaking nature of this. I'm not ready to say this is OK, we might need to consider retiring the project tool packages and put the global tools in new packages, or something else. |
Talked a little in person with @DamianEdwards. We think new package IDs is probably the best way to help users manage this big change. The install gesture will be dotnet-*
Microsoft.Tool.*
Microsoft.DotNet.Tool.*Same as above, just with a longer prefix "Microsoft.DotNet.Tool" Thoughts @DamianEdwards @muratg @Eilon @ajcvickers @divega @glennc ? |
I'm leaning towards the very short names, e.g. dotnet-watch. I think it's time. |
+1 for short names |
As I've been trying to do for years, I'd like to package all of EF's global tools inside the |
Have we talked to other tool builders about packaging/naming? I imagine there are some other toolchains that want to (eventually) ship multiple tools in a single package... |
So far, the global tools discussion has been mostly done internally. I don't think we've looped in external contributors into the discussion yet. I also would like to see enough flexibility in the global tools design to allow multiple tools in one package, and re-using a runtime package as a tool package, but the current design wouldn't allow that. |
This is on their radar for the future, right?
What's preventing this now? |
Per discussion this afternoon, I've updated the PR to include the rename of the package ID. The following NEW packages are created by this PR. Old packages won't be upgraded to support global tools.
|
@natemcmaster sorry for the belated response. I think this is reasonable given all the constraints. It seems if we stick to this naming convention it should be easier to discover what to do when a tool I want to run is not installed. We could even consider improving the error you get from the CLI to say "missing a global tool? Try dotnet install -g dotnet-xyz" (or whatever the command is for installing it). |
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.
Signing off for the dev-cert parts. I'll let @bricelam sign-off for the EF tools, but everything else looks good to me.
Two infrastructure issues we should resolve before we merge this:
|
Updated the "packageType" value to DotnetGlobalTool. This is just a placeholder value. The spec hasn't defined-yet what the value should be. |
FYI package type issue is here NuGet/Home#6198 |
Thanks. I updated to "DotnetTool" per this comment https://github.com/dotnet/designs-microsoft/pull/12#discussion_r157843056 |
Added infrastructure improvements to allow us to sign our own assemblies, 3rd-party sign JSON.NET, and skip signing for assemblies that come from the dotnet-core team (should already be signed). cref aspnet/BuildTools#531 |
d401410
to
cf45e0f
Compare
- Rename package IDs to dotnet-watch, dotnet-user-secrets, and dotnet-sql-cache - Change packaging layout to support dotnet-install-tool - Change package metadata to DotnetTool - Drop support for DotNetCliToolReference (those will continue to be available under previous package ID's) - Rename project files and folders
cf45e0f
to
261b27b
Compare
⚠️ this will be a breaking change for some users because it drops support for tools working as a DotNetCliToolReference. The current design of CLI global tools does not allow structuring a package that supports both DotNetCliToolReference and the new Update: we are going to use new package IDs, instead of attempting to update existing ones.dotnet install tool
verb.Resolves #368
Ports our command-line tools to support global CLI commands.
The following NEW packages are created by this PR. Old packages won't be upgraded to support global tools.
DotNetCliToolRefererence
)dotnet install tool
)cc @livarcocc @wli3 @DamianEdwards @glennc