Skip to content

Commit e414eea

Browse files
committed
chore: track public API surface
1 parent f537389 commit e414eea

4 files changed

Lines changed: 242 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Contributing
2+
3+
## Public API changes
4+
5+
`Microsoft.CodeAnalysis.PublicApiAnalyzers` tracks the library's public surface. A build fails when public members change without a matching baseline update.
6+
7+
For an intentional API change:
8+
9+
1. Add new declarations to `EnumerableAsyncProcessor/PublicAPI.Unshipped.txt`.
10+
2. Prefix removed declarations with `*REMOVED*` in `PublicAPI.Unshipped.txt`.
11+
3. Include the baseline changes in the same pull request as the code change so reviewers can inspect the public API diff.
12+
4. Move approved declarations from `PublicAPI.Unshipped.txt` to `PublicAPI.Shipped.txt` when preparing a release. Keep `#nullable enable` as the first line in both files.
13+
14+
Run `dotnet build` to verify the baseline on every target framework.

EnumerableAsyncProcessor/EnumerableAsyncProcessor.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
<Nullable>enable</Nullable>
77
<LangVersion>latest</LangVersion>
88
<Version>99.99.99</Version>
9+
<WarningsAsErrors>$(WarningsAsErrors);RS0016;RS0017</WarningsAsErrors>
10+
<!-- Existing overload families intentionally retain optional parameters. -->
11+
<NoWarn>$(NoWarn);RS0026</NoWarn>
912
</PropertyGroup>
1013

1114
<PropertyGroup>
@@ -30,9 +33,15 @@
3033

3134
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.301" PrivateAssets="All"/>
3235
<PackageReference Include="System.Threading.RateLimiting" Version="10.0.10" />
36+
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="5.6.0" PrivateAssets="All" />
3337

3438
</ItemGroup>
3539

40+
<ItemGroup>
41+
<AdditionalFiles Include="PublicAPI.Shipped.txt" />
42+
<AdditionalFiles Include="PublicAPI.Unshipped.txt" />
43+
</ItemGroup>
44+
3645
<PropertyGroup>
3746
<Authors>Tom Longhurst</Authors>
3847
<Description>Various Enumerable Async Processors - Batch / Parallel / Rate Limited / One at a time</Description>

0 commit comments

Comments
 (0)