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

dotnet tool installs unlisted and depreciated version #32728

Closed
fabiomadge opened this issue May 22, 2023 · 6 comments
Closed

dotnet tool installs unlisted and depreciated version #32728

fabiomadge opened this issue May 22, 2023 · 6 comments

Comments

@fabiomadge
Copy link

fabiomadge commented May 22, 2023

Describe the bug

Installing without a specified version doesn't get me the latest listed version. I would expect to get 4.1.0, which I get when browsing NuGet, or doing dotnet tool search dafny, but I get 4.1.0.50509 instead.

To Reproduce

dotnet tool install --tool-path . dafny
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Tools untriaged Request triage from a team member labels May 22, 2023
@baronfel
Copy link
Member

The NuGet API has that version as the most recent (you can see this in this manifest at the very bottom of the list): https://api.nuget.org/v3-flatcontainer/dafny/index.json, so our behavior is at least consistent with that. I think the presence of that NuGet-style version is throwing things off - I would check with the package authors to see more about when that package was created.

@fabiomadge
Copy link
Author

I'm somewhat to blame there. 4.1.0.50509 was released by mistake because of broken release automation. 4.1.0 was released after and is what I want our users to see.

@baronfel
Copy link
Member

Ok, gotcha. I think this is another symptom of the fact that we use 'restore' under the hood here. Restore is allowed to retrieve unlisted versions because for a normal project you don't want to break consumers. Tools shouldn't behave in that same way, however, and when we rewrite these experiences to use the NuGet APIs directly instead of indirectly, we can and will enforce this filtering you intended.

I strongly expect this is a duplicate of an issue we've got linked in the .NET 8 Tools epic, I'll try to link it shortly.

@KalleOlaviNiemitalo
Copy link
Contributor

@baronfel, perhaps you mean #32092, where the "DepMan" tool had version 0.0.4 in a private feed and unlisted version 1.0.0 at nuget.org, and .NET SDK chose to install 1.0.0.

@nagilson nagilson removed the untriaged Request triage from a team member label Jun 8, 2023
@nagilson
Copy link
Member

nagilson commented Jun 8, 2023

@baronfel Should we close this in favor of #32092 ?

@nagilson nagilson removed their assignment Jun 8, 2023
@baronfel
Copy link
Member

baronfel commented Jun 8, 2023

Yes, good call.

@baronfel baronfel closed this as not planned Won't fix, can't repro, duplicate, stale Jun 8, 2023
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

4 participants