KEMBAR78
[net10.0] Local and Copilot dev can generate public apis by mattleibow · Pull Request #30661 · dotnet/maui · GitHub
Skip to content

Conversation

mattleibow
Copy link
Member

Backport of #30500

@Copilot Copilot AI review requested due to automatic review settings July 16, 2025 15:29
@mattleibow mattleibow requested a review from a team as a code owner July 16, 2025 15:29
Copy link
Contributor

@Copilot Copilot AI left a 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 is a backport that enables local development and Copilot workflows to automatically generate public API files instead of only validating them. The change introduces a new build target that uses Mono.ApiTools.MSBuildTasks to generate public API files during the build process, while maintaining validation-only behavior for CI/CD environments.

Key changes:

  • Adds conditional logic to determine whether to generate or validate public API files based on environment context
  • Introduces a new MSBuild target for generating public API files using Mono.ApiTools.MSBuildTasks
  • Removes unnecessary public API analyzer warning suppressions since generation handles API changes automatically

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/PublicAPI.targets Adds conditional logic and new MSBuild target for public API generation
src/SingleProject/Resizetizer/src/Resizetizer.csproj Removes version constraint from Mono.ApiTools.MSBuildTasks package reference
src/Controls/src/Core/Layout/FlexLayout.cs Removes public API analyzer warning suppressions
src/Controls/src/Core/Element/Element.cs Removes public API analyzer warning suppressions
eng/Versions.props Adds version definition for Mono.ApiTools.MSBuildTasks
eng/NuGetVersions.targets Adds package reference update for Mono.ApiTools.MSBuildTasks

@mattleibow mattleibow changed the base branch from net10.0 to dev/sort-apis July 16, 2025 16:32
Base automatically changed from dev/sort-apis to net10.0 July 16, 2025 18:48
* Local and Copilot dev can generate public apis

Currently, the only way is to use the IDE and the lightbulb - or manually.
This is often not successful and AI still struggles as well.

The new version of the Mono.ApiTools.MSBuildTasks package now has
the ability to generate the files and they can be checked in during
development to show the actual API changes.

The rules would be if this is release of CI, then it is set to Validate only,
and then only if it is debug AND not CI (ie: local) will it enable generation.

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt
@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen merged commit f82aaeb into net10.0 Jul 17, 2025
1 of 34 checks passed
@PureWeen PureWeen deleted the dev/net10-auto branch July 17, 2025 04:27
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2025
@PureWeen PureWeen added the area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions label Aug 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants