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

[Breaking change]: Enable users to install unlisted version of tool if specify the exact match of the version of the tool #37655

Closed
1 of 3 tasks
JL03-Yue opened this issue Oct 20, 2023 · 1 comment · Fixed by #37982
Assignees
Labels
breaking-change Indicates a .NET Core breaking change 🏁 Release: .NET 8 Work items for the .NET 8 release doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@JL03-Yue
Copy link
Member

JL03-Yue commented Oct 20, 2023

Description

dotnet/sdk#36021

The change provides a feature to allow users to install the unlisted version but only if the user specify the exact match, i.e. [version]. (referred to NuGet package version reference).

Version

.NET 8 GA

Previous behavior

In .NET 8 we made a breaking change that changes the current .NET tool installation mechanism from restore a local temporary project to downloading the .NET tool from NuGet. This change was introduced because this previous mechanism has number of side effects, often show up as flaky restore errors because MSBuild concepts like Directory.Build.props, or other heirarchical notions, pollute the restore. However, this change disabled users from installing unlisted tools

New behavior

The new change allows users to install unlisted tools if specifying exact match of the version, i.e. [version].

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.
  • Behavioral change: Existing binaries may behave differently at run time.

Reason for change

#35566

The change of using NuGet API for downloading tools disabled users from installing unlisted tools. Previously, users were able to install unlisted tools per fix in dotnet/sdk#28951. However, since the mechanism of tool installation are changed, the unlisted tools' downloading are disabled by default. For users, installing unlisted tools are a useful method because it provides clarity and simplicity for those who write tools independently or do not share the tools to the public.

Recommended action

N/A

Feature area

SDK

Affected APIs

No response


Associated WorkItem - 177286

@JL03-Yue JL03-Yue added doc-idea Indicates issues that are suggestions for new topics [org][type][category] breaking-change Indicates a .NET Core breaking change Pri1 High priority, do before Pri2 and Pri3 labels Oct 20, 2023
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Oct 20, 2023
@gewarren gewarren removed the ⌚ Not Triaged Not triaged label Oct 20, 2023
@gewarren gewarren added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Oct 31, 2023
@github-actions github-actions bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Nov 1, 2023
@dsplaisted
Copy link
Member

I've made some suggested edits to this breaking change notice, see below. FYI @gewarren

Description

The dotnet tool install commands will no longer install tools from unlisted versions of NuGet packages, unless the version to install is specified on as an exact version surrounded with brackets, for example --version [5.0.0].

dotnet/sdk#36021

The change provides a feature to allow users to install the unlisted version but only if the user specify the exact match, i.e. [version]. (referred to NuGet package version reference).

Version

.NET 8 GA

Previous behavior

Previously, when installing .NET tools, the .NET SDK would install tools (and versions of tools) without considering whether the tool package was unlisted.

New behavior

Unlisted tool versions will not be installed by default, unless the exact version is specified with --version [version].

Type of breaking change

.NET CLI behavior change - dotnet commands behave differently with a new SDK.

Reason for change

We believe the correct default behavior is to ignore unlisted packages when installing tools. See dotnet/sdk#24037 and dotnet/sdk#32092.

Recommended action

To install an unlisted tool, specify the exact version of the tool surrounded with brackets, for example --version [5.0.0].

Feature area

SDK

Affected APIs

No response

@gewarren gewarren added the 🏁 Release: .NET 8 Work items for the .NET 8 release label Nov 2, 2023
@gewarren gewarren moved this from 🔖 Ready to 👀 In review in dotnet/docs November 2023 sprint Nov 8, 2023
@ghost ghost added the in-pr This issue will be closed (fixed) by an active pull request. label Nov 8, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in .NET 8.0 work items Nov 8, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in dotnet/docs November 2023 sprint Nov 8, 2023
@ghost ghost removed the in-pr This issue will be closed (fixed) by an active pull request. label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates a .NET Core breaking change 🏁 Release: .NET 8 Work items for the .NET 8 release doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
No open projects
Status: Done
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants