Skip to content
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

Add option for comparing NuGet structure and NuGet metadata. #17

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Sep 11, 2023

Currently, we use api-tools in AndroidX and GooglePlayServices repositories to help us verify changes to C# APIs when we make binding changes.

However, there are some additional scenarios we would like to verify changes to:

  • Changes to the NuGet metadata, like <title> or <description>
  • Changes to the files contained in the NuGet package, like to ensure that a needed .targets file doesn't disappear
    • Note this is only comparing which files exist in the package, not if the file contents changed

These additional checks will help give us more confidence to update our project file templates without silently breaking packages.

Implemented as a new option:

api-tools nuget-diff --compare-nuget-structure

If there are changes to NuGet metadata or contents, this will produce a file called nuget-diff.md in the output directory. This file looks like:

## Xamarin.AndroidX.Window

### Changed Metadata

```
- <title>.NET for Android (formerly Xamarin.Android) AndroidX - window</title>
+ <title>.NET for Android AndroidX - window</title>
```

### Added/Removed File(s)

```
- lib/monoandroid12.0/Xamarin.AndroidX.Window.pdb
- lib/net6.0-android31.0/Xamarin.AndroidX.Window.pdb
```

@mattleibow
Copy link
Owner

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mattleibow mattleibow merged commit d201c76 into mattleibow:master Oct 5, 2023
1 check passed
@jpobst jpobst deleted the diff-extensions branch October 19, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants