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

App-configurable compatibility options implementation: CompatibilityOptions #4976

Merged
merged 25 commits into from
Dec 20, 2024

Conversation

codendone
Copy link
Contributor

Implements #4966.

Adds CompatibilityOptions

CompatibilityOptions configures which changes in Windows App SDK servicing releases are enabled. By default, all changes are enabled, but CompatibilityOptions can be used to lock the runtime behavior to a specified patch version or to disable specific changes:

  • Choose the patch version: You can specify which servicing patch version's behavior you want to use. For example, your app can specify that it wants the 1.7.2 version behavior, which will have Windows App SDK run in that mode even if 1.7.3 or later is installed. This capability allows you to control when your app gets new fixes or behavior changes, even when not using self-contained mode.
  • Temporarily disable specific changes: If your app encounters a problem with a specific change in a servicing update, you can disable just that change while still benefiting from the other changes or features in that update. (All changes are enabled by default for the patch version in use.) Disabling a change is a temporary measure which gives time for a fix to be released in a future Windows App SDK update or for you to implement an update in your app.

Implementation notes

  • Per the spec, project properties can be set rather than directly using CompatibilityOptions. This works by generating an auto-initializer with the specified options.
  • The existing auto-initializers have been adjusted to be helpers called by a single, common auto-initializer. This ensures a clear and consistent order of initialization.
  • A few core CompatibilityTests have been added for the new API and are included in the test suite.
  • Test apps for both C# and C++ have been added to test the project properties. These tests are just compile-time tests to ensure the properties generate the correct code. These test apps don't install or bootstrap the runtime to be able to actually run the code.

WindowsAppRuntime.sln Outdated Show resolved Hide resolved
@codendone
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codendone
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codendone
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codendone codendone merged commit ee017d2 into main Dec 20, 2024
26 checks passed
@codendone codendone deleted the user/codendone/compatibilityOptions branch December 20, 2024 05:56
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