-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add support for in-proc Com state separation #2068
Conversation
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentactivatable amd Archs dsc Globals hackathon mytool Packagedx parametermap whatifTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:yao-msft/winget-cli.git repository
|
UserSettings::UserSettings() : m_type(UserSettingsType::Default) | ||
bool TryInitializeCustomUserSettings(std::string content) | ||
{ | ||
if (s_userSettingsInitialized || s_userSettingsInInitialization) |
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.
This is probably the right approach for now, but we should have a test to make sure that our suggested method for initialization is working so that we don't load the settings earlier than that.
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.
yes, I verified manually it's working as expected, and it should and will be part of Com e2e test.
CoCreatableClassWrlCreatorMapInclude(PackageManager); | ||
CoCreatableClassWrlCreatorMapInclude(FindPackagesOptions); | ||
CoCreatableClassWrlCreatorMapInclude(CreateCompositePackageCatalogOptions); | ||
CoCreatableClassWrlCreatorMapInclude(InstallOptions); | ||
CoCreatableClassWrlCreatorMapInclude(UninstallOptions); | ||
CoCreatableClassWrlCreatorMapInclude(PackageMatchFilter); | ||
CoCreatableClassWrlCreatorMapInclude(PackageManagerSettings); |
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.
I feel like the only thing stopping this from being used OOP is the fact that it isn't registered in our AppxManifest.xml
. I don't know if that makes it impossible to create, or just harder.
Not that it would be the end of the world or anything, but I think we would prefer that they not create it OOP if that doesn't require a lot of work.
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.
After several hours of exploring, I think it requires some amount of work to do custom registration and maintaining the registrations. And it needs more thorough testing if we choose that route. So I'll leave it for now.
Change
Added a process global PackageManagerSettings Com object to support better state separation for in-proc Com invocations.
Also make the package applicability check take in InstallOptions to give better results.
Validation
Added back unpackaged tests run under system context.
Manually tried calling the PackageManagerSettings and see logs, etc are saved under state specific folder.
Next is the Com e2e test.
Microsoft Reviewers: Open in CodeFlow