Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a new Cake build target to automate the management of PublicAPI files across the .NET MAUI repository. The main purpose is to streamline the process of regenerating PublicAPI.Unshipped.txt files when new public APIs are added, helping developers resolve build errors more efficiently.
Key Changes:
- Added a new
publicapiCake task that clears and regenerates allPublicAPI.Unshipped.txtfiles across Core, Controls, Essentials, and Graphics projects - Updated development documentation with instructions for manual PublicAPI generation and the new automated Cake target
- Regenerated multiple PublicAPI.Unshipped.txt files with consistent formatting and updated API declarations
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| eng/cake/dotnet.cake | Added new publicapi task to automate clearing and regenerating PublicAPI files |
| docs/DevelopmentTips.md | Added documentation for the new --target=publicapi parameter |
| .github/DEVELOPMENT.md | Added section explaining manual PublicAPI file generation |
| src//PublicAPI//PublicAPI.Unshipped.txt | Multiple files updated with consistent formatting (BOM addition) and API reorganization |
Comments suppressed due to low confidence (1)
3ee8167 to
2f81478
Compare
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
mattleibow
previously approved these changes
Jul 17, 2025
mattleibow
previously approved these changes
Jul 17, 2025
db7d5f3 to
e4f89cd
Compare
Member
Author
|
/backport to main |
Contributor
|
Started backporting to main: https://github.com/dotnet/maui/actions/runs/16374026941 |
Contributor
|
@PureWeen backporting to "main" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Add cake target that will regenerate the public API txt files
Applying: - fix
error: sha1 information is lacking or useless (eng/cake/dotnet.cake).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 - fix
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description of Change
Add cake target that we can use to regenerate all the PublicAPI.txt files
This will delete all the content and regenerate because sometimes it can't quite reorganize or modify correctly.
I realize this one also has a lot of txt file changes. Hopefully this will get all of those files into a state that runs consistently with this target.
This pull request introduces a new process for managing PublicAPI files and addresses related build issues. It includes updates to documentation, a new Cake task for automating PublicAPI management, and changes to the
PublicAPI.Unshipped.txtfiles to reflect recent API updates.PublicAPI Management Enhancements:
Documentation Updates:
.github/DEVELOPMENT.mdexplaining how to manually generatePublicAPI.Unshipped.txtfiles using thePublicApiType=Generateproperty during builds.docs/DevelopmentTips.mdto include a new--target=publicapiparameter for thedotnet cakecommand, which automates clearing and regeneratingPublicAPI.Unshipped.txtfiles.New Cake Task:
publicapitask ineng/cake/dotnet.caketo clear and regeneratePublicAPI.Unshipped.txtfiles across all projects (Core, Controls, Essentials, Graphics). The task skips Windows-specific files on non-Windows platforms and always skips Tizen files.These changes aim to streamline the PublicAPI management process and ensure the API definitions are up-to-date and consistent across the codebase.