-
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
Changes from all commits
e3be31b
ea1932d
41e88dd
d0572ba
cbbfb22
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
|
|
||
| namespace Microsoft.Dotnet.Installation; | ||
| public record DotnetInstallRoot( | ||
| string Path, | ||
| InstallArchitecture Architecture); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
| using Microsoft.Deployment.DotNet.Releases; | ||
|
|
||
| namespace Microsoft.Dotnet.Installation; | ||
|
|
||
| public interface IDotnetInstallDiscoverer | ||
| { | ||
| DotnetInstallRoot GetDotnetInstallRootFromPath(); | ||
|
|
||
| IEnumerable<ReleaseVersion> GetInstalledVersions(DotnetInstallRoot dotnetRoot, InstallComponent component); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
| using Microsoft.Deployment.DotNet.Releases; | ||
|
|
||
| namespace Microsoft.Dotnet.Installation; | ||
|
|
||
| public interface IDotnetInstaller | ||
| { | ||
| void Install(DotnetInstallRoot dotnetRoot, InstallComponent component, ReleaseVersion version); | ||
dsplaisted marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
| void Uninstall(DotnetInstallRoot dotnetRoot, InstallComponent component, ReleaseVersion version); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
| using Microsoft.Deployment.DotNet.Releases; | ||
|
|
||
| namespace Microsoft.Dotnet.Installation; | ||
|
|
||
| public interface IDotnetReleaseInfoProvider | ||
| { | ||
| IEnumerable<string> GetAvailableChannels(); | ||
|
|
||
| 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 commentThe 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 commentThe 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 commentThe 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'). |
||
| //IEnumerable<ReleaseVersion> GetAllVersions(InstallComponent component, string channel); | ||
|
|
||
| SupportType GetSupportType(InstallComponent component, ReleaseVersion version); | ||
| } | ||
|
|
||
| public enum SupportType | ||
| { | ||
| OutOfSupport, | ||
| LongTermSupport, | ||
| StandardTermSupport | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace Microsoft.Dotnet.Installation; | ||
|
|
||
| public enum InstallComponent | ||
| { | ||
| SDK, | ||
| Runtime, | ||
| ASPNETCore, | ||
| WindowsDesktop | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| <IsAotCompatible>true</IsAotCompatible> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Deployment.DotNet.Releases" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
Uh oh!
There was an error while loading. Please reload this page.