Fix build issue for wslsettings, and add more logging to the pipelines#40388
Open
Fix build issue for wslsettings, and add more logging to the pipelines#40388
Conversation
d1e0aba to
6ce31d3
Compare
OneBlue
reviewed
May 4, 2026
|
|
||
| - ${{ each target in parameters.targets }}: | ||
| - script: cmake --build . --config Release --target ${{ target.target }} -- -m | ||
| - script: cmake --build . --config Release --target ${{ target.target }} --verbose -- -m /bl:$(ob_outputDirectory)\binlogs\${{ parameters.platform }}-1.binlog |
Collaborator
There was a problem hiding this comment.
That's true for CI builds, but release builds actually run this multiple times (so each stage can sign before packaging).
I think the suggestion of appending the target names is a good idea to avoid overwriting the binlog
OneBlue
reviewed
May 8, 2026
|
|
||
| - ${{ each target in parameters.targets }}: | ||
| - script: cmake --build . --config Release --target ${{ target.target }} -- -m | ||
| - script: cmake --build . --config Release --target ${{ target.target }} -- -m /bl:$(ob_outputDirectory)\binlogs\${{ parameters.platform }}-1.binlog |
Collaborator
There was a problem hiding this comment.
I think we should prepend the target names to the binlog paths so this task doesn't overwrite the previous binlogs.
We could use something like this:
$[replace('${{ target.target }}', ';', '-')]
To get rid of the special characters
Or simplify the names via something like:
${{ split('${{ target.target }}', ';')[0]
And just use the first executable in the target list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Fixes the recurring build error
PR Checklist
Detailed Description of the Pull Request / Additional comments
The build often fails when attempting to write auto-generated source files related to WinUI in
wslsettings. The failure seems to happen because the directory for those files does not exist when trying to create the file. These generated files are usually compiled in memory, but on official builds CodeQL forces them to be written to disk for analysis by setting the MSBuild propertyEmitCompilerGeneratedFiles=true. MSBuild usually ensures that the directory exists with theCreateCompilerGeneratedFilesOutputPathtarget which is configured to run before theCoreCompiletarget. However, the WinUI auto-generated files are created in theXamlPreCompiletarget, which does not have a dependency onCreateCompilerGeneratedFilesOutputPath, so it is not guaranteed to run after it.The fix for the build failure is to add a target that ensures the directory exists before
XamlPreCompileruns.This PR also sets MSBuild to output binlogs to the pipeline artifacts to make it easier to debug pipeline failures in the future.
Validation Steps Performed