-
Notifications
You must be signed in to change notification settings - Fork 344
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
DynamicDependencies: Use Win11 APIs if available #3704
Merged
Merged
Conversation
This file contains 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
…ork is done. Cleanup and test revisions needed but progress
…ce during early 1.x days but not moved forward and starting to age out. Removed rather than continuing upkeep
…olve an unresolved PackageDependency
…d()). Updated tests.
…t. Left IsSupported() unchanged (Win11 >=22H2) for now while I investigate further
/azp run |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
/azp run |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Just a heads up. Develop branch has been renamed to become the new Main Branch and is the default branch from now on. |
[celebrate] Scott Jones reacted to your message:
…________________________________
From: Kyaw Thant ***@***.***>
Sent: Tuesday, November 21, 2023 1:39:36 AM
To: microsoft/WindowsAppSDK ***@***.***>
Cc: Scott Jones ***@***.***>; Review requested ***@***.***>
Subject: Re: [microsoft/WindowsAppSDK] DynamicDependencies: Use Win11 APIs if available (PR #3704)
Just a heads up. Develop branch has been renamed to become the new Main Branch and is the default branch from now on.
—
Reply to this email directly, view it on GitHub<#3704 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC6IYIZM3IFH4FB6MOVMYXTYFQA5RAVCNFSM6AAAAAAZ6NSW5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRQGA3TMNJVG4>.
You are receiving this because your review was requested.Message ID: ***@***.***>
|
wcheng-msft
reviewed
Nov 27, 2023
wcheng-msft
reviewed
Nov 27, 2023
/azp run |
wcheng-msft
approved these changes
Nov 27, 2023
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.
/azp run |
/azp run |
kythant
added a commit
that referenced
this pull request
Jan 26, 2024
DrusTheAxe
added a commit
that referenced
this pull request
Jan 31, 2024
DrusTheAxe
added a commit
that referenced
this pull request
Feb 5, 2024
…#4083 (#4108)" (#4118)" (#4135)" (#4140) * Revert "Revert "DynamicDependencies: Use Win11 APIs if available #3704 #4083 (#4108)" (#4118)" (#4135)" This reverts commit 117ed20. * Disable DynamicDependency-delegate-to-OS by changing IsSupported() (not reverting the world) * PackageRuntimeManager tests rely on OS DynDep functionality but Setup was a parallel version check when it should have been IsSupported. Fixed so they're all using the same answer * Doh! Had the check reversed -- if (foo) should have been if (!foo). Fixed * Tweak TryCreatePackageDependency when calling the OS with an invaliud package family name we get back STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED but should return to the caller E_INVALIDARG * Remove false skip-tests check. The surgical IsSupported disables all delegation to OS APIs. When that changes we WANT the tests to run and canary any problem * Bad test passing too long a VersionTag. Tweaked Bootstrapper to spew WIL message and deal instead of FAIL_FAST * Fixed PackageDependency.m_packageFullName was never set and .PackageId string fields (e.g. .name) weren't properly set, though they weren't used so not noticed or harm (before the resolution fix - next sentence...). Fixed TryCreatePackageDependency() wasn't resolving the dependency unless the MddCreatePackageDependencyOptions_DoNotVerifyDependencyResolution option was specified. Fixed up some test issues as well asupdates in sync with the fixes (above) * Fixed tests to correctly match (fixed) implementation * Improved some test logging. Fided up a few tests out of date with the latest behavior
bpulliam
pushed a commit
that referenced
this pull request
Feb 7, 2024
…#4083 (#4108)" (#4118)" (#4135)" (#4140) * Revert "Revert "DynamicDependencies: Use Win11 APIs if available #3704 #4083 (#4108)" (#4118)" (#4135)" This reverts commit 117ed20. * Disable DynamicDependency-delegate-to-OS by changing IsSupported() (not reverting the world) * PackageRuntimeManager tests rely on OS DynDep functionality but Setup was a parallel version check when it should have been IsSupported. Fixed so they're all using the same answer * Doh! Had the check reversed -- if (foo) should have been if (!foo). Fixed * Tweak TryCreatePackageDependency when calling the OS with an invaliud package family name we get back STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED but should return to the caller E_INVALIDARG * Remove false skip-tests check. The surgical IsSupported disables all delegation to OS APIs. When that changes we WANT the tests to run and canary any problem * Bad test passing too long a VersionTag. Tweaked Bootstrapper to spew WIL message and deal instead of FAIL_FAST * Fixed PackageDependency.m_packageFullName was never set and .PackageId string fields (e.g. .name) weren't properly set, though they weren't used so not noticed or harm (before the resolution fix - next sentence...). Fixed TryCreatePackageDependency() wasn't resolving the dependency unless the MddCreatePackageDependencyOptions_DoNotVerifyDependencyResolution option was specified. Fixed up some test issues as well asupdates in sync with the fixes (above) * Fixed tests to correctly match (fixed) implementation * Improved some test logging. Fided up a few tests out of date with the latest behavior
bpulliam
added a commit
that referenced
this pull request
Feb 8, 2024
* Revert "Revert "DynamicDependencies: Use Win11 APIs if available #3704 #4083 (#4108)" (#4118)" (#4135)" This reverts commit 117ed20. * Disable DynamicDependency-delegate-to-OS by changing IsSupported() (not reverting the world) * PackageRuntimeManager tests rely on OS DynDep functionality but Setup was a parallel version check when it should have been IsSupported. Fixed so they're all using the same answer * Doh! Had the check reversed -- if (foo) should have been if (!foo). Fixed * Tweak TryCreatePackageDependency when calling the OS with an invaliud package family name we get back STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED but should return to the caller E_INVALIDARG * Remove false skip-tests check. The surgical IsSupported disables all delegation to OS APIs. When that changes we WANT the tests to run and canary any problem * Bad test passing too long a VersionTag. Tweaked Bootstrapper to spew WIL message and deal instead of FAIL_FAST * Fixed PackageDependency.m_packageFullName was never set and .PackageId string fields (e.g. .name) weren't properly set, though they weren't used so not noticed or harm (before the resolution fix - next sentence...). Fixed TryCreatePackageDependency() wasn't resolving the dependency unless the MddCreatePackageDependencyOptions_DoNotVerifyDependencyResolution option was specified. Fixed up some test issues as well asupdates in sync with the fixes (above) * Fixed tests to correctly match (fixed) implementation * Improved some test logging. Fided up a few tests out of date with the latest behavior Co-authored-by: Howard Kapustein <howardk@microsoft.com>
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.
DynamicDependencies: Use Win11 APIs if available
Leverage the the Win11 Dynamic Dependency API if available, otherwise use WinAppSDK's implementation (aka polyfill). The WinAppSDK DynDep C API handles this, thus benefiting all callers of WinAppSDK's C and WinRT DynDep API (e.g. C# via projections).
This happens on Win11 >= 22H2 (aka SV2).
NOTE: This makes the DDLM irrelevant on Win11 22H2+ (>SV2). A future (separate) PR will change the intaller to not install the DDLM packages on these systems.
NOTE: Persisted definitions aren't imported into the OS after OSupgrade to Win11 22H2+. If you create a persisted definition (LifetimeKind=FilePath|RegistryKey) on older you'll need to re-create them after the OS upgrades.
NOTE: MddGetResolvedPackageFullNameForPackageDependency()'s behavior differed from GetResolvedPackageFullNameForPackageDependency(). Both return null vs package full name when the PackageDependencyId is not resolved vs resolved but the HRESULT return value differed
MddGetResolvedPackageFullNameForPackageDependency() has been changed to match the OS API. A new OS API will be needed to distinguish between a known valid PackageDependencyId that's not been resolved yet vs an invalid/unknown PackageDependencyId.
NOTE: This change is compatible with the documented behavior. It'll be noted in the release notes.
NOTE: As a byproduct of return MddGetResolvedPackageFullNameForPackageDependency() error handling the WinRT APIs
PackageDependency.GetFromId()
andPackageDependency.GetFromIdForSystem()
no longer fail for an unknown/invalid id e.g.PackageDependency.GetFromId("not a valid id")
. Inappropriate later use will fail e.g.NOTE: A new OS API is needed to determine if a
PackageDependencyId
is a valid (known) value. WinAppSDK will be updated to use that when available.https://task.ms/47326537