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

Building only changed components. #647

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

Conversation

azchohfi
Copy link
Contributor

No description provided.

@azchohfi azchohfi force-pushed the alzollin/build_changes branch from 973b04b to 1dc4770 Compare February 27, 2025 01:50
# Generate full solution with all projects (sample gallery heads, components, tests)
- name: Generate solution with ${{ matrix.multitarget }} gallery, components and tests
working-directory: ./
run: powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -MultiTargets ${{ matrix.multitarget }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }} -WinUIMajorVersion ${{ matrix.winui }}" -ErrorAction Stop
run: powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -MultiTargets ${{ matrix.multitarget }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }} -Components ${{ env.CHANGED_COMPONENTS_LIST }} -WinUIMajorVersion ${{ matrix.winui }}" -ErrorAction Stop
Copy link
Member

Choose a reason for hiding this comment

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

@Arlodotexe how does the input to the components parameter here in our script work with dependencies? i.e. if the only change is in X but that depends on component Y (in labs I guess), then is slngen/msbuild smart enough to know that Y is built too? I guess that'd mean we'd end up with packages for X and Y if only X changed. But that's not really a common thing we do here (compared to the main repo).

And I think this is just a process we'd use here in labs, so we could push things when changed to NuGet.org vs. in the main toolkit where we can just snap a preview to NuGet anyway and have nightlies in the custom feed if folks still need those, eh?

Copy link
Member

@Arlodotexe Arlodotexe Feb 28, 2025

Choose a reason for hiding this comment

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

if the only change is in X but that depends on component Y (in labs I guess), then is slngen/msbuild smart enough to know that Y is built too?

Yes, you can specify a single component that references other components (such as SettingsControls in mainline WCT) and the dependencies (Extensions, Converters, etc) will get picked up.

I guess that'd mean we'd end up with packages for X and Y if only X changed.

No, the package build script ./tooling/Build-Toolkit-Components.ps1 doesn't use slngen in any capacity. It will only build the components you supply in the list, including nuget package and binlog output.

We can safely pass the same Components parameter that we use for our solution gen script to the component build script in the package step.

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.

3 participants