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

Add automatically tool upgrade and downgrade for different versions for dotnet tool install #35088

Closed
wants to merge 7 commits into from

Conversation

JL03-Yue
Copy link
Member

@JL03-Yue JL03-Yue commented Sep 1, 2023

#9500

Update dotnet tool local install so that it support automatic upgrade, downgrade, and error-throwing behaviors.

  • If the command doesn't specify version, the latest version is installed. Exit code = 0
  • If the command specify version 3.0.0 and version 3.0.0 is installed, do nothing. Exit code = 0
  • If the command specify version 3.0.0 and version 2.0.0 is installed, upgrade to 3.0.0. Exit code = 0
  • If the command specify version 3.0.0 without --allow-downgrade flag and version 4.0.0 is installed, it throws out an error.
  • If the command specify version 3.0.0 with--allow-downgrade flag and version 4.0.0 is installed, downgrade to 3.0.0. Exit code = 0

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Sep 1, 2023
@JL03-Yue
Copy link
Member Author

JL03-Yue commented Sep 4, 2023

@dsplaisted @baronfel Hi! I found a long hanging pr #31549 that is supposed to automatically upgrade and downgrade a tool given specified version. I thought this feature is quite useful because it allows users more flexibility in terms of handling tool versions and less prone to errors, so I recreated this pr and refine some of the checks. Is it possible if someone can review it? I'd love to resolve follow-ups as well~

Besides, this change only allows automatic upgrade and downgrade to local tools, I wonder if we would like to expand it some time to global tool as well~? Depending on business priorities:D

@JL03-Yue JL03-Yue changed the base branch from main to release/8.0.2xx December 4, 2023 09:35
@dsplaisted
Copy link
Member

I haven't reviewed the code yet, but the behavior from the PR description sounds good. I think global and local tool installs should both behave this way.

Right now it looks like this code is failing to compile.

@JL03-Yue JL03-Yue closed this Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants