gir.core icon indicating copy to clipboard operation
gir.core copied to clipboard

Check for api changes during CI

Open badcel opened this issue 3 years ago • 0 comments

Verify if we can use generated xml doc comments to check for api changes: we commit the current xml doc comments. If the doc comments changed after the generation the api has changed and the ci run should fail.

The author of the PR has to update the doc comments first (copy into specific folder) to confirm an api check. Afterwards the ci run should not fail because the new and specified doc comments file are identical.

This would stop the build for documentation changes, too. This is okay as it guaranties double checking for doc changes as docs gets published on the gir.core website.

Use f# script to check the reference file for equality with the new file and return an error code to fail ci.

This could be implemented as a new command as part of GirTool. The generate command would need a new option to create the xml doc.


Other possibilities:

  • https://github.com/PublicApiGenerator/PublicApiGenerator/tree/master/src
  • https://www.nuget.org/packages/Microsoft.CodeAnalysis.PublicApiAnalyzers
  • https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/overview

https://andrewlock.net/preventing-breaking-changes-in-public-apis-with-publicapigenerator/

badcel avatar Feb 07 '22 05:02 badcel