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

48525090 Delegate DynamicDependencies to OS API when available #4136

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

DrusTheAxe
Copy link
Member

@DrusTheAxe DrusTheAxe commented Jan 30, 2024

https://task.ms/48525090

This changes to only use Detours when needed. Today that's <=22H2 (SV2), or to be pedantic Detours is needed on...

  • <=RS5 for Undocked RegFreeWinRT (as OS RegFree WinRT requires >=19H1)
  • <=22H2 (SV2 RTM) for polyfill Dynamic Dependencies (we use OS DynDep on >=22H2)

We also use Detours for some Package Graph support required by polyfill Dynamic Dependencies.

Some test environments encountered errors due disabling Detours hooks for DynDep but enabling them for URFW. Keep it consistent to avoid inconsistent behavior.

Summary:

  • Change to only enable Detours when we use WinAppSDK's Dynamic Dependency polyfill implementation (disable when DynDep delegates to OS DynDep)
  • Added UndockedRegFreeWinRT tests (forked variant of those in WindowsAppSDKAggregator, forked to accomodate our test environment and just Foundation types instead of the end product nuget/msix and their additional types)
  • added .winmd to the test Microsoft.WindowsAppRuntime.Framework package (or else some APIs like ApiInformation.IsPresent() fail as they require the *.winmd at runtime)
  • Update WIL from 1.0.220914.1 to 1.0.240122.1 (and fixed up build errors due to it)
  • Renamed IsWindows11_23H1OrGreater() to IsWindows11_24H2OrGreater() as that's what it actually probed
  • Added IsWindows11_23H2OrGreater()
  • Fixed bugs in AccessControlTests (e.g. setup/cleanup didn't due to wrong package family name)
  • Improved error handling and logging in ::Test::Package::RemovePackage()

…uture reference. Rename IsWindows11_23H1OrGreater() to ...24H2... as that's what it's probing. Added IsWindows11_23H2OrGreater()
@DrusTheAxe
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…thus APIs like ApiInformation would fail as they require the .winmd at runtime)
…ator, tweaked to work with our test (fake) packages instead of the (real) WinAppSDK MSIX packages
@DrusTheAxe DrusTheAxe self-assigned this Jan 31, 2024
@DrusTheAxe DrusTheAxe added area-Infrastructure Build, test, source layout, package construction (TODO: move to Deployment, DeveloperTools) area-DynamicDependencies area-UndockedRegFreeWinRT labels Jan 31, 2024
@DrusTheAxe DrusTheAxe added this to the 1.5 milestone Jan 31, 2024
@DrusTheAxe
Copy link
Member Author

/azp run

Copy link

Pull request contains merge conflicts.

@DrusTheAxe
Copy link
Member Author

Dependent on completing #4140

@DrusTheAxe DrusTheAxe marked this pull request as ready for review January 31, 2024 09:36
@DrusTheAxe
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@DrusTheAxe
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

{
"Tests": [
{
"Description": "UndockedRegFreeWinRT (URFW) tests (arm64 not currently enabled)",
Copy link
Member

Choose a reason for hiding this comment

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

why not arm64?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ummm, copy pasta? But with mushrooms and basil! :P

DIR /S/B *.testdef

test\AppLifecycle\AppLifecycle.testdef
"Architectures": ["x64", "arm64"],
Why no x86?

test\DynamicDependency\Powershell\DynamicDependency_Powershell.testdef
"Architectures": ["x64", "arm64"],
Why no x86?

test\DynamicDependency\Test_Win32\DynamicDependency_API_Win32.testdef
"Architectures": ["x64", "arm64"],
Why no x86?

test\DynamicDependency\Test_WinRT\DynamicDependency_API_WinRT.testdef
"Architectures": ["x64", "arm64"],
Why no x86?

test\PackageManager\API\Test.testdef
"Architectures": ["x86", "x64"],
Why no arm64?

test\PushNotificationTests\PushNotificationTests.testdef
"Architectures": ["x64"],
"Status": "Disabled"
Why no x86 or arm64?
And why disabled?

I'll take care of DynamicDependency + PackageManager (and URFW). You got the rest?

@bpulliam bpulliam modified the milestones: 1.5, 1.6 Feb 29, 2024
@DrusTheAxe DrusTheAxe added this to the 1.6 milestone Feb 29, 2024
@DrusTheAxe DrusTheAxe changed the title 48525090 Fix failing tests 48525090 Delegate DynamicDependencies to OS API when available Feb 29, 2024
@DrusTheAxe
Copy link
Member Author

P.S. Additional testing and maybe a fix needed before this is ready for checkin

@mominshaikhdevs
Copy link

hoping it gets worked on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DynamicDependencies area-Infrastructure Build, test, source layout, package construction (TODO: move to Deployment, DeveloperTools) area-UndockedRegFreeWinRT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants