Encapsulate build/component members with explicit visibility - #405
Merged
Conversation
Collaborator
|
So you decided to add visibility keywords after all? I'm fine with both, but wondering whether you actually considered my arguments. |
Collaborator
Author
ah I see what you mean, i think i was just a bit sleepdrunk when I did that ... /build can/should be excluded. I'll sort this out tomorrow :-) can probably just drop an ignore override inside the build folder |
ChrisonSimtian
force-pushed
the
chore/encapsulate-build-visibility
branch
from
June 22, 2026 07:38
dabc657 to
ec7298d
Compare
dennisdoomen
approved these changes
Jun 22, 2026
…d/ folder Makes accessibility explicit on shipped/tested surface — no behavioural change: - Component interfaces (IFalloutBuild, ICreateGitHubRelease, IHasTwitterCredentials, ISignPackages, IToolOptionsWithFramework): drop the redundant `public` from interface members (implicitly public; matches the for_non_interface_members rule). - Consumer/sample builds under tests/ and DefaultInterfaceExecutionTest: explicit internal/private. The dogfood build/ folder is deliberately exempted rather than encapsulated: a [build/**.cs] editorconfig section relaxes dotnet_style_require_accessibility_modifiers there, so build scripts stay terse (convenience over ceremony, per @dennisdoomen's "never bothered with visibility in builds" note). The explicit modifiers this PR originally added under build/ are dropped to match. Split out of #393. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ChrisonSimtian
force-pushed
the
chore/encapsulate-build-visibility
branch
from
June 22, 2026 08:20
ec7298d to
cae83f9
Compare
ChrisonSimtian
enabled auto-merge (rebase)
June 22, 2026 08:22
ChrisonSimtian
disabled auto-merge
June 22, 2026 21:48
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.
Split out of #393 per @dennisdoomen's review that the combined PR had grown too large.
What this does
Makes accessibility explicit on shipped and tested surface — no behavioural change — while deliberately exempting the dogfood
build/folder instead of encapsulating it:IFalloutBuild,ICreateGitHubRelease,IHasTwitterCredentials,ISignPackages,IToolOptionsWithFramework): drop the redundantpublicfrom interface members (implicitly public — matchesfor_non_interface_members).tests/+DefaultInterfaceExecutionTest: explicitinternal/private.build/folder: exempted from the rule. A new[build/**.cs]section in.editorconfigrelaxesdotnet_style_require_accessibility_modifiers, so build scripts stay terse (convenience over ceremony — Dennis's "never bothered with visibility in builds"). The explicit modifiers an earlier revision added underbuild/are dropped to match.Why exempt build/ rather than encapsulate it
The build project is our own dogfood console app, not shipped API. Forcing explicit accessibility there fights the convenience that makes build scripts pleasant to write, and those modifiers "often just get dropped" anyway. Exempting the folder once in
.editorconfigis more durable than re-adding modifiers commit by commit.Verification
Rebased onto
main(was conflicting).dotnet build build/_build.csprojsucceeds, 0 errors.🤖 Generated with Claude Code