Skip to content
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

--create-manifest-if-needed for tool manifest behaviour discussion, and the -d option to list location searched doesn't do what it claims #36830

Open
smoothdeveloper opened this issue Nov 13, 2023 · 2 comments
Milestone

Comments

@smoothdeveloper
Copy link

I've not been able to try it with latest rc2, but wondering if the command still fails due to no manifest, is it advertising the option implemented in #31231?

$ dotnet tool install mytool
error, no manifest found, consider running dotnet tool install mytool --create-manifest-if-needed or dotnet new tool-manifest and reruning dotnet tool install mytool.
locations searched for:
...

this should be the default (if --create-manifest-if-needed is still explicit opt-in as default, rather than opt out), if it is opt-out it should just go ahead and create the manifest and print the location of it when creating it.

Also, when I run this command in https://github.com/stephan-tolksdorf/fparsec/

$ dotnet -d tool install fsharp-analyzers                                                                                                                                         

I get:

Telemetry is: Enabled
Microsoft.DotNet.Cli.Utils.GracefulException: Cannot find a manifest file.
For a list of locations searched, specify the "-d" option before the tool name.
If you intended to install a global tool, add --global to the command.
If you would like to create a manifest, use dotnet new tool-manifest, usually in the repo root directory.
at Microsoft.DotNet.Tools.Tool.Install.ToolInstallLocalCommand.GetManifestFilePath()
at Microsoft.DotNet.Tools.Tool.Install.ToolInstallLocalCommand.Execute()
at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)

the -d flag doesn't make it list anything, only a more detailed stack trace.

I tried before and after removing global.json from the fparsec repository.

 $ dotnet --info
.NET SDK:
 Version:   8.0.100-rc.2.23502.2
 Commit:    0abacfc2b6

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  13.4
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.100-rc.2.23502.2/

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.0-rc.2.23479.6
  Architecture: arm64
  Commit:       0b25e38ad3

.NET SDKs installed:
  6.0.400 [/usr/local/share/dotnet/sdk]
  6.0.401 [/usr/local/share/dotnet/sdk]
  6.0.405 [/usr/local/share/dotnet/sdk]
  7.0.100-preview.7.22377.5 [/usr/local/share/dotnet/sdk]
  7.0.100-rc.2.22477.23 [/usr/local/share/dotnet/sdk]
  7.0.102 [/usr/local/share/dotnet/sdk]
  7.0.304 [/usr/local/share/dotnet/sdk]
  8.0.100-preview.5.23303.2 [/usr/local/share/dotnet/sdk]
  8.0.100-preview.6.23330.14 [/usr/local/share/dotnet/sdk]
  8.0.100-rc.1.23463.5 [/usr/local/share/dotnet/sdk]
  8.0.100-rc.2.23502.2 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.13 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0-preview.7.22376.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0-rc.2.22476.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-preview.5.23302.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-preview.6.23329.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-rc.1.23421.29 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-rc.2.23480.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0-preview.7.22375.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0-rc.2.22472.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-preview.5.23280.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-preview.6.23329.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-rc.1.23419.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-rc.2.23479.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  x64   [/usr/local/share/dotnet/x64]
    registered at [/etc/dotnet/install_location_x64]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Tools untriaged Request triage from a team member labels Nov 13, 2023
@JL03-Yue
Copy link
Member

JL03-Yue commented Nov 13, 2023

Thank you for the suggestion! This is a great suggestions and we'd love to take that into consideration. However, we are also trying to avoid that there could potentially generating manifest file accidentally on unexpected locations, and you could run unexpected tools, as the side effect of creating a manifest file by default. We did take it into consideration when adding the create-manifest-if-needed flag. @baronfel Is there any thought from you on this feature?

@smoothdeveloper
Copy link
Author

Adding another outcome I encounter, and reinsures me a tiny bit in my reading comprehension

For a list of locations searched, specify the "-d" option before the tool name.

$ dotnet tool install -d fsharp-analyzers
Unrecognized command or argument 'fsharp-analyzers'.

Description:
  Install global or local tool. Local tools are added to manifest and restored.
... all the help

@JL03-Yue JL03-Yue added this to the Backlog milestone Apr 4, 2024
@JL03-Yue JL03-Yue removed the untriaged Request triage from a team member label Apr 4, 2024
@JL03-Yue JL03-Yue removed their assignment Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants