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

[Spec] First pass at Side-By-Side support. #3940

Closed
wants to merge 9 commits into from

Conversation

denelon
Copy link
Contributor

@denelon denelon commented Nov 30, 2023

Related to:

Possibly related to:


Microsoft Reviewers: Open in CodeFlow

doc/specs/#2129 - Side-by-side.md Outdated Show resolved Hide resolved
doc/specs/#2129 - Side-by-side.md Outdated Show resolved Hide resolved
doc/specs/#2129 - Side-by-side.md Outdated Show resolved Hide resolved
doc/specs/#2129 - Side-by-side.md Outdated Show resolved Hide resolved
doc/specs/#2129 - Side-by-side.md Show resolved Hide resolved
doc/specs/#2129 - Side-by-side.md Show resolved Hide resolved
Copy link
Contributor Author

@denelon denelon left a comment

Choose a reason for hiding this comment

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

update for deny upgrade behavior

Copy link
Contributor

@mdanish-kh mdanish-kh left a comment

Choose a reason for hiding this comment

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

Some packages (Microsoft.PowerShell, Microsoft.VisualStudioCode...screenshot attached below) allow side-by-side installations of same versions of different scope. WinGet should be able to disambiguate installed versions based on scope as well and allow users to:

winget uninstall/install/upgrade Microsoft.VisualStudioCode --version <side_by_side_version> --scope machine/user

image

Copy link
Contributor Author

@denelon denelon left a comment

Choose a reason for hiding this comment

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

update comment

@JohnMcPMS
Copy link
Member

I updated the "implementation" section of the main issue with a brain dump that includes things beyond SxS but that are generally related to the greater concept of a more complex association graph.

As @mdanish-kh points out, this spec targets SxS versions, but disregards the potential for SxS within the same version, via scope, architecture, etc. This is relevant for any commands that target the installed entity (upgrade, uninstall).

I want to request flexibility here on the UX of the CLI, as we will need to carefully balance adding more data to the index to achieve the winget list goals. On the other side, we will also be relying on the manifest for deeper information but we only want to pull that down as needed, such as winget list <single package ID> to be able to enumerate every version and flavor of installed item.

@denelon
Copy link
Contributor Author

denelon commented Dec 1, 2023

Locale is the other troublemaker.

I'll work on additional updates to the proposed specification.

During some very early discussions (2019), we were working on the characteristics that would uniquely define an installer within a manifest for a particular version of a package:

  • Installer Type (MSIX, MSI, EXE)
  • Architecture (x86, x64, ARM, ARM64)
  • Target Platform (Desktop, Server)
  • Locale (BCP-47 format)
  • Scope (User vs. System)

The other concept mentioned in the updated description of the issue was called out as "group package". I've been thinking of that concept in terms of either a virtual package, or a provider concept.

The example for Python is fairly straight forward as there is one logical ISV (independent software vendor)/Publisher. I actually see Java (JRE/JDK) as more complex due to the fact that there could be more than one ISV/Publisher. In the case of dependencies where a package might need some minimum version of a JRE or a JDK, WinGet could potentially detect that the dependency was met by more than one ISV/Publisher. In the case of an install prerequisite (dependency) for another package, it's not obvious how a preference would be specified, or a default should be chosen.

@Trenly
Copy link
Contributor

Trenly commented Dec 1, 2023

During some very early discussions (2019), we were working on the characteristics that would uniquely define an installer within a manifest for a particular version of a package:

  • Installer Type (MSIX, MSI, EXE)
  • Architecture (x86, x64, ARM, ARM64)
  • Target Platform (Desktop, Server)
  • Locale (BCP-47 format)
  • Scope (User vs. System)

I would add that there should likely be a priority order here - where if a user has a specific architecture installed, that should be respected even if the underlying installer type changed. Ideally all of these uniquely defined installers would be present in the manifest, but with many different permutations of install parameters, it's likely that one (or more) could be missing from the definitions. The client should be able to reasonably detect when an available version doesn't have an architecture matching the installed architecture, same with scope and, where possible, locale.

Although, the more I think about it, that is probably more of a related feature than specific to SxS support

@denelon
Copy link
Contributor Author

denelon commented Dec 1, 2023

Comments/Concerns:

@ImJoakim
@ItzLevvie
@jedieaston
@KaranKad
@mdanish-kh
@OfficialEsco
@quhxl
@russellbanks
@Trenly

@denelon denelon changed the title First pass at Side-By-Side support. [Spec] First pass at Side-By-Side support. Dec 6, 2023

### WinGet Pin

The current behaviors associated with pinned packages will continue to be honored.
Copy link
Contributor

Choose a reason for hiding this comment

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

Question on gating pins.

Assume I have the following pin:

Name                   Id                       Version Source Pin type
-----------------------------------------------------------------------
Microsoft .NET SDK 3.1 Microsoft.DotNet.SDK_3.1 3.1.42* winget Gating

If I have these two versions installed -

Name                                                Id                                     Version       Available Source
-------------------------------------------------------------------------------------------------------------------------
Microsoft .NET Core SDK 3.1.426 (x64)               Microsoft.DotNet.SDK.3_1               3.1.426                 winget
Microsoft .NET Core SDK 3.1.426 (x64)               Microsoft.DotNet.SDK.3_1               3.1.456                 winget

Would the behavior still be to not upgrade, even though I have 3.1.456 installed? clearly the 3.1.426 shouldn't be upgraded, but would 3.1.456 be omitted from upgrade?

@denelon
Copy link
Contributor Author

denelon commented Feb 29, 2024

I'm going to go ahead and close this since we're taking a different approach on how we're slicing up the side-by-side support. I expect @JohnMcPMS will have a PR for part of this work coming soon™️

@denelon denelon closed this Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants