-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add interfaces for installation library #51184
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
base: dnup
Are you sure you want to change the base?
Conversation
470934a
to
d0572ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick up take on this - I've left some feedback below!
src/Installer/Microsoft.Dotnet.Installation/IDotnetInstallDiscoverer.cs
Outdated
Show resolved
Hide resolved
src/Installer/Microsoft.Dotnet.Installation/IDotnetInstallDiscoverer.cs
Outdated
Show resolved
Hide resolved
|
||
public interface IDotnetInstaller | ||
{ | ||
void Install(DotnetInstallRoot dotnetRoot, InstallComponent component, ReleaseVersion version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we provide a doc string mentioning this Installer interface does not support updating / tracking of these installers? I imagine we'll end up implementing an 'archive' installer for local zip installs just like how the other one works today. That allows us to expand with an admin installer in the future (msi, pkg, distro feed pk mgr)
|
||
public interface IDotnetInstaller | ||
{ | ||
void Install(DotnetInstallRoot dotnetRoot, InstallComponent component, ReleaseVersion version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to support a custom interface for our output? (e.g. spectre .console abstraction)
We could do similarly for logging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious on @MichaelSimons opinion on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is something to ask Aspire. Would we also make use of it in the DNUP usage scenario?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, how we want to hook up logging (and in general console output) is a good question.
|
||
ReleaseVersion GetLatestVersion(InstallComponent component, string channel); | ||
|
||
// Get all versions in a channel - do we have a scenario for this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are using the term channel currently to mean, 'latest' or 'lts' or '9.0' or '9.0.102' in DNUP we may want to consider the terminology here. Channel has a specific meaning the release manifest context which is separate from how we are treating it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does channel mean in the context of the release manifest? Any ideas on how to disambiguate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A channel version typically describes the major.minor that defines the manifest: https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json ( see at the top of the file.) @joeloff mentioned channel is considered an overloaded term. (Note that I take ownership of calling it a channel too in the code 😁 )
The LTS/STS disambiguation is a term called 'release-type'.
The fully specified version is a 'version'.
So far in our code base, the 'channel' can be any of those - a fully specified version, unfully specified version (or even a channel-version per se), a release type, or something else ('latest', 'preview').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will the consumer acquire/instantiate the concrete implementations of these interfaces?
src/Installer/Microsoft.Dotnet.Installation/IDotnetInstallDiscoverer.cs
Outdated
Show resolved
Hide resolved
|
||
public interface IDotnetInstaller | ||
{ | ||
void Install(DotnetInstallRoot dotnetRoot, InstallComponent component, ReleaseVersion version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aspire asked for update support. Is the vision that they would manage the update via the install/uninstall apis vs providing a direct api?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Daniel and I discussed and the vision was that there would be a separate installer interface that creates the 'dnup manifest' but just not in a dnup directory and instead in the dotnet root. The first release of the lib would just support basic install and a more complex interface would later be available that does more of the heavy lifting. I think we called it IDotnetInstallerManager.
Not sure at this point, we may have concrete classes that can be instantiated, or maybe we'll have a static factory. |
@davidfowl @DamianEdwards @mitchdenny can you folks take a look at this? The idea would be to use these interfaces as part of our CLI to be able to get a local copy of the SDK. |
What is |
Initial draft of interfaces to support VS Project System and Aspire scenarios. These are almost certain to change but should let us get feedback and get started.
Primary interfaces
Support types