KEMBAR78
Add support for exporting package related DSC v3 resources and some predefined resources in configure export all by yao-msft · Pull Request #5428 · microsoft/winget-cli · GitHub
Skip to content

Conversation

yao-msft
Copy link
Contributor

@yao-msft yao-msft commented May 2, 2025

  • Break existing CreateConfigurationUnit function to 3 steps: Create unit, Export unit and Add dependent unit to unit
  • Added support for exporting individual package settings if a dsc v3 resources could be found for that package
  • Added support for exporting some predefined resources
  • Manually validated the exported file and added e2e tests
Microsoft Reviewers: Open in CodeFlow

@yao-msft yao-msft requested a review from a team as a code owner May 2, 2025 20:46
<value>Applying configuration unit...</value>
</data>
<data name="ConfigurationExportingUnit" xml:space="preserve">
<value>Applying configuration unit...</value>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<value>Applying configuration unit...</value>
<value>Exporting configuration unit...</value>

Comment on lines 50 to 51
constexpr std::wstring_view s_UnitType_WinGetPackage_DSCv3 = L"Microsoft.WinGet/WinGetPackage";
constexpr std::wstring_view s_UnitType_WinGetSource_DSCv3 = L"Microsoft.WinGet/WinGetSource";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
constexpr std::wstring_view s_UnitType_WinGetPackage_DSCv3 = L"Microsoft.WinGet/WinGetPackage";
constexpr std::wstring_view s_UnitType_WinGetSource_DSCv3 = L"Microsoft.WinGet/WinGetSource";
constexpr std::wstring_view s_UnitType_WinGetPackage_DSCv3 = L"Microsoft.WinGet/Package";
constexpr std::wstring_view s_UnitType_WinGetSource_DSCv3 = L"Microsoft.WinGet/Source";

Also, to prevent conflicts I'm making the dev build use `Microsoft.WinGet.Dev" as the root name. I can deal with the fallout though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to add UserSettingsFile resource here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's declared in below PredefinedResources

JohnMcPMS
JohnMcPMS previously approved these changes May 2, 2025
florelis
florelis previously approved these changes May 3, 2025
Copy link
Member

@florelis florelis left a comment

Choose a reason for hiding this comment

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

(I only looked at the last commit after John's review)

JohnMcPMS
JohnMcPMS previously approved these changes May 3, 2025
@yao-msft yao-msft dismissed stale reviews from JohnMcPMS and florelis via 122354e May 3, 2025 04:35
@JohnMcPMS JohnMcPMS merged commit 3f1ede7 into microsoft:master May 3, 2025
9 checks passed
@yao-msft yao-msft deleted the exportall branch May 3, 2025 06:47
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.

4 participants