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 ability to install runtime only #18

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nikolai-laevskii
Copy link

@nikolai-laevskii nikolai-laevskii commented Sep 4, 2023

Description:
Added ability to select to install runtime only instead of SDK. It utilizes built-in features of the dotnet-install script by conditionally passing -Runtime/--runtime flag.

Related issue:
actions#352

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@dsame dsame self-assigned this Sep 8, 2023
dotnetInstaller = new DotnetCoreInstaller(version, quality);
dotnetVersionResolver = new DotnetVersionResolver(version);
dotnetInstaller = new DotnetCoreInstaller(
await dotnetVersionResolver.createDotnetVersion(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approved the whole PR but still have a question: what was a reason to move DotnetVersionResolver out of DotnetCoreInstaller? It doesn't seem to use any benefits of being instantiated in the run but brings a bunch of not-necessary changes in the tests.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this particular PR it was done primarily to keep it in sync with the other PR: #19 so there wouldn't be so many conflicts to resolve and they wouldn't be too complicated. In general, syncing them like that, might not be a good idea, but because setup-dotnet doesn't get that many updates, it's just makes things a bit easier without any significant drawbacks.

As per change itself, it removes hard-coupled dependency on DotnetVersionResolver and makes implementation more flexible when it comes to introducing changes.

  1. DotnetVersionResolver can now have additional parameters and they won't have to be passed through DotnetCoreInstaller
  2. DotnetVersionResolver logic and API can now be altered without introducing changes to DotnetCoreInstaller
  3. DotnetCoreInstaller doesn't need to have version resolution logic inside it as it only works with specific version format. Removing such logic makes DotnetCoreInstaller simpler and easier to maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants