-
Notifications
You must be signed in to change notification settings - Fork 334
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 spec: CompatibilityOptions #4966
base: main
Are you sure you want to change the base?
Conversation
|
||
# Background | ||
|
||
_This spec adds a CompatibilityOptions class to control behavior of servicing changes._ |
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.
RuntimeCompatibilityOptions
?
AppConfigurableCompatibility
?
(Naming, hard :-()
|
||
Apps using Windows App SDK have two choices today: use Windows App SDK as an | ||
automatically-updating framework package or use Windows App SDK in self-contained mode with no | ||
automatic updates. Apps which use the framework package automatically get fixes, which is great, |
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.
It's not 'automatic updates' but WHO does the servicing. MSIX packages routinely get serviced by Microsoft and others (whoever gets an update to the PC first) vs self-contained copies are serviced by the app/developer. Apps using non-MSIX technologies may perform automatic updates of their dependencies, but it's entirely dependent on the app developer on when (or even if) to do so.
SUGGESTION: ...in self-contained mode updated only if/when the containing application/publisher decides to update its copy of Windows App SDK.
(or words to that effect)
features which require shared services, such as some Notification features delivered via the | ||
Singleton package. | ||
|
||
App-configurable compatibility is intended to prevent these problems, enabling apps to choose to |
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.
'App-configurable compatibility' - seems to be the catchy term for this feature. API naming should match?
var compatibilityOptions = new CompatibilityOptions(); | ||
compatibilityOptions.PatchMode1 = new WindowsAppRuntimeVersion(1,7,3); | ||
compatibilityOptions.PatchMode2 = new WindowsAppRuntimeVersion(1,8,2); | ||
compatibilityOptions.DisabledChanges.Add(CompatibilityChange.HypotheticalChange); |
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.
Is HypotheticalChange
an actual thing or it's representative of an actual value? If the latter please use a more real example
``` | ||
|
||
Note that CompatibilityOptions must be applied early in the process before any other Windows App | ||
SDK APIs are called, or right after initializing the Windows App Runtime. |
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.
initializing the Windows App Runtime
What does this mean? When does this occur? There is no WindowsAppRuntimeInitialize()
function (intentionally)
Do you mean the bootstrapper APIs? Other APIs?
|
||
Apply the set compatibility options to the runtime. | ||
|
||
Note that CompatibilityOptions must be applied early in the process before any other Windows App |
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.
SUGGESTION: NOTE: `CompatibilityOptions MUST be...
- Bold the NOTE: prefix instead of conversational english
- Capitalize MUST, much like IEEE MUST/SHOULD/MAY phrasing (RFC 2119)
to ensure the configuration will no longer change. Calling `Apply` will also lock the | ||
configuration. | ||
|
||
If the configuration has already been locked, calling `Apply` will throw an `E_ILLEGAL_STATE_CHANGE` |
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.
Is that a way to 'Reset` or 'Unapply' the configuration? OR no, 'till process death do you part?
# API Details | ||
|
||
```c# (but really MIDL3) | ||
namespace Microsoft.Windows.ApplicationModel.WindowsAppRuntime |
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.
Missing API contract
SUGGESTION:
namespace Microsoft.Windows.ApplicationModel.WindowsAppRuntime
{
[contractversion(1)]
apicontract AppConfigurableCompatibilityContract{};
/// The set of servicing changes that can be disabled.
[contract(AppConfigurableCompatibilityContract, 1)]
enum CompatibilityChange
...
UInt32 Patch; | ||
}; | ||
|
||
/// This object is used by the app to configure any desired compatibility options |
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.
By the "app" or "process"?
Can OOP WinRT servers use this API? Are OOP WinRT servers apps?
SUGGESTION: This object is used by the process...
/// This object is used by the app to configure any desired compatibility options | ||
/// for Windows App Runtime behavior of changes added in servicing updates. This | ||
/// object is only used to set the runtime behavior and can't be used to query the | ||
/// applied options. |
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.
Why no query API?
Let me guess: An app specifying this knows what it's doing so it doesn't have to query at runtime.
Question: What are class libraries supposed to do?
Lacking a query API creates issues for library authors. How does a library know current process' behavior? They don't control the process/environment they run in (not the app). Would that amount to...?
[contract(AppConfigurableCompatibilityContract, 1)]
runtimeclass CurrentCompatibilityOptions
{
static CurrentCompatibilityOptions GetDefault();
WindowsAppRuntimeVersion EffectiveVersion { get; }
IVector<CompatibilityChange> DisabledChanges{ get; };
}
Spec for app-configurable compatibility options, which can be set via
CompatibilityOptions
APIs or via project properties.