Platform-aware Install-PSResource: filter runtimes by RID, libs by TFM#1963
Draft
jshigetomi wants to merge 1 commit intoPowerShell:masterfrom
Draft
Platform-aware Install-PSResource: filter runtimes by RID, libs by TFM#1963jshigetomi wants to merge 1 commit intoPowerShell:masterfrom
jshigetomi wants to merge 1 commit intoPowerShell:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
This pull request introduces platform-aware filtering for package extraction, allowing for more precise installation of runtime and framework-specific assets. It adds new parameters to control runtime and target framework selection, and implements logic to only extract files relevant to the current or specified environment. Additionally, it exposes new internal hooks for testing and introspection of runtime and package filtering behavior.
Platform-aware extraction and filtering:
Added support for filtering extracted package files by Runtime Identifier (RID) and Target Framework Moniker (TFM) during installation. Only assets matching the detected or specified platform/framework are extracted from
.nupkgfiles, improving cross-platform compatibility and reducing unnecessary files. (InstallHelper.cs,InstallPSResource.cs) [1] [2] [3] [4]Introduced new parameters to the install command:
SkipRuntimeFiltering,RuntimeIdentifier, andTargetFramework, allowing users to control platform and framework filtering behavior during installation. (InstallPSResource.cs)Internal APIs and test hooks:
InternalHooks.cs)Dependency and import updates:
NuGet.Frameworksand related namespaces to support framework parsing and selection logic. (InstallHelper.cs,PSResourceInfo.cs) [1] [2]These changes collectively enable more intelligent and customizable package installation, especially for scenarios involving cross-platform deployments or advanced asset filtering.
Tooling Impact
This PR adds new user-facing parameters
-RuntimeIdentifier,-TargetFramework,-SkipRuntimeFilteringand changes default install behavior (fewer files extracted). That could impact:PR Context
Platform aware installation was brought up in issue: #794.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.