Skip to content

Reintroduce JetBrains [PublicAPI] as an IDE authoring hint on consumer-facing assemblies #539

Description

@ChrisonSimtian

Problem

PR #76 removed JetBrains.Annotations wholesale (~1450 [PublicAPI] + friends). Side effect: Rider/ReSharper now flag Fallout's public build-authoring surface as "unused" — because it is unused in-repo by design (external consumers call it, we don't). Contributors get persistent false-positive "unused symbol" noise on exactly the API we ship.

[PublicAPI] tells the IDE "this is intentional API, consumed externally — don't flag it." It's an IDE authoring hint only: zero runtime/semantic effect.

Not this issue: API-surface break detection / changelog gating. That's #410 / #530 (Roslyn PublicApiAnalyzers). Complementary and separate — one silences an IDE hint, the other guards the shipped surface.

Outcome

Consumer-facing ("outer") assemblies advertise their public surface as intentional API again, so:

  • contributors stop getting false unused-symbol warnings on shipped API;
  • consumers' own Rider/ReSharper sees our surface as API too (the annotation flows through the package, no PrivateAssets).

Acceptance criteria

  • JetBrains.Annotations referenced so the annotation flows to consumers (no PrivateAssets).
  • Outer/consumer-facing assemblies carry [assembly: PublicAPI] via a single allowlist (one source of truth), not ~1450 hand-placed attributes.
  • Inner assemblies (Cli, Migrate, SourceGenerators, MSBuildTasks, Tooling.Generator, Persistence) get no blanket; genuine extensibility types there are annotated per-type ([PublicAPI] in source) — the hybrid split.
  • An ADR records the decision (mechanism + outer/inner criterion) and goes up for public review.
  • An encapsulation-audit doc tracks any public-by-accident types the pass surfaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions