Skip to content

Conversation

@JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Nov 5, 2025

Change

The primary motivation is to support directories below the install location to contain configuration units that we will associate with the package. This is achieved by refactoring the association logic from a Package x Unit loop into a tree structure that is colored by package install locations. This also has the benefit of making a O(N^2) algorithm into an O(N).

Units are first inserted into the tree based on their file path. Then the install location of each package is recorded onto that tree as well. Finally, during the export of each package, all resources at the install location and any that are descended from it but not under another package are included.

Validation

Added unit tests for path tree and E2E test update for subdirectory.

Microsoft Reviewers: Open in CodeFlow

@github-actions

This comment was marked as outdated.

dkbennett
dkbennett previously approved these changes Nov 6, 2025
Copy link
Member

@dkbennett dkbennett left a comment

Choose a reason for hiding this comment

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

Nice tree utility, solution, and performance improvement! Some minor comments, but LGTM.

dkbennett
dkbennett previously approved these changes Nov 7, 2025
@JohnMcPMS JohnMcPMS merged commit 087ea0e into microsoft:master Nov 10, 2025
9 checks passed
@JohnMcPMS JohnMcPMS deleted the rsc-subdir branch November 10, 2025 20:01
JohnMcPMS added a commit to JohnMcPMS/winget-cli that referenced this pull request Nov 10, 2025
…nstall location (microsoft#5859)

## Change
The primary motivation is to support directories below the install
location to contain configuration units that we will associate with the
package. This is achieved by refactoring the association logic from a
Package x Unit loop into a tree structure that is colored by package
install locations. This also has the benefit of making a O(N^2)
algorithm into an O(N).

Units are first inserted into the tree based on their file path. Then
the install location of each package is recorded onto that tree as well.
Finally, during the export of each package, all resources at the install
location and any that are descended from it but not under another
package are included.
JohnMcPMS added a commit that referenced this pull request Nov 10, 2025
…2) (#5866)

CP of #5859

## Change
The primary motivation is to support directories below the install
location to contain configuration units that we will associate with the
package. This is achieved by refactoring the association logic from a
Package x Unit loop into a tree structure that is colored by package
install locations. This also has the benefit of making a O(N^2)
algorithm into an O(N).

Units are first inserted into the tree based on their file path. Then
the install location of each package is recorded onto that tree as well.
Finally, during the export of each package, all resources at the install
location and any that are descended from it but not under another
package are included.
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.

2 participants