-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix public api cake #30695
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
Fix public api cake #30695
Conversation
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.
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
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
db7d5f3 to
e4f89cd
Compare
|
/backport to main |
|
Started backporting to main: https://github.com/dotnet/maui/actions/runs/16374026941 |
|
@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! |
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.