Reintroduce JetBrains [PublicAPI] as an IDE authoring hint#541
Draft
ChrisonSimtian wants to merge 1 commit into
Draft
Reintroduce JetBrains [PublicAPI] as an IDE authoring hint#541ChrisonSimtian wants to merge 1 commit into
ChrisonSimtian wants to merge 1 commit into
Conversation
Partially reverses the wholesale JetBrains.Annotations removal (Fallout-build#76), for the [PublicAPI] concern only and via a per-assembly blanket instead of ~1450 hand-placed attributes. Rider/ReSharper flagged Fallout's public build-authoring surface as unused because it is unused in-repo by design (external consumers call it); [PublicAPI] marks it as intentional API. IDE hint only, no runtime effect. - Directory.Build.props: outer (consumer-facing) assemblies get [assembly: PublicAPI] via the _FalloutOuterApiAssemblies allowlist (single source of truth); the JetBrains.Annotations reference flows to consumers (no PrivateAssets). Opt out with <FalloutPublicApi>false</FalloutPublicApi>. - Inner assemblies get no blanket. Fallout.Persistence.Solution's four model types that surface through Fallout.Solution's public API carry a per-type [PublicAPI] instead (the hybrid split) - a blanket would bless the vendored parser's implementation detail. - ADR-0011 records the decision; docs/api-encapsulation-audit.md tracks the outer/inner split and the carve-outs. Distinct from public-API break detection (Fallout-build#410 / Fallout-build#530). Tracks Fallout-build#539. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
@dennisdoomen i brought |
ITaluone
approved these changes
Jul 24, 2026
ITaluone
left a comment
Collaborator
There was a problem hiding this comment.
Nice!
Never got the reason for removing in the first place 🫢 But cool to see the actual value ;)
Collaborator
Author
So this time its a bit more targeted, organised and I want the AI instructions side-by-side to ensure we maintain those properly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #539. Reintroduces
[PublicAPI]for the IDE "unused symbol" hint only — not API-break detection (that's the #530 / #540 track, a separate concern).Rider/ReSharper flags Fallout's public build-authoring surface as unused because it is unused in-repo by design (external consumers call it, we don't).
[PublicAPI]marks it as intentional API. IDE hint only — no runtime/semantic effect.Approach — hybrid (see ADR-0011)
[assembly: PublicAPI]via the_FalloutOuterApiAssembliesallowlist inDirectory.Build.props(single source of truth). TheJetBrains.Annotationsreference flows to consumers (noPrivateAssets), so their Rider sees our surface as API too.Fallout.Persistence.Solutionmodel types that surface throughFallout.Solution's public API (SolutionModel,SolutionItemModel,SolutionProjectModel,SolutionFolderModel) carry a per-type[PublicAPI]instead — a blanket would bless the vendored parser's implementation detail.<FalloutPublicApi>false</FalloutPublicApi>.Only
[PublicAPI]comes back; the other JetBrains attributes removed in #76 stay removed.Docs
docs/adr/0011-reintroduce-publicapi-ide-hint.md— Proposed, up for discussion here.docs/api-encapsulation-audit.md— the outer/inner split, the per-type carve-outs, and the public-by-accident follow-up the coarse blanket implies.Full solution builds green;
[assembly: PublicAPI]verified emitted on outer assemblies and absent on inner.