Skip to content

Encapsulate build/component members with explicit visibility - #405

Merged
ChrisonSimtian merged 1 commit into
mainfrom
chore/encapsulate-build-visibility
Jun 22, 2026
Merged

Encapsulate build/component members with explicit visibility#405
ChrisonSimtian merged 1 commit into
mainfrom
chore/encapsulate-build-visibility

Conversation

@ChrisonSimtian

@ChrisonSimtian ChrisonSimtian commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Components (IFalloutBuild, ICreateGitHubRelease, IHasTwitterCredentials, ISignPackages, IToolOptionsWithFramework): drop the redundant public from interface members (implicitly public — matches for_non_interface_members).
  • Consumer/sample builds under tests/ + DefaultInterfaceExecutionTest: explicit internal/private.
  • build/ folder: exempted from the rule. A new [build/**.cs] section in .editorconfig relaxes dotnet_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 under build/ 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 .editorconfig is more durable than re-adding modifiers commit by commit.

Verification

Rebased onto main (was conflicting). dotnet build build/_build.csproj succeeds, 0 errors.

🤖 Generated with Claude Code

@dennisdoomen

Copy link
Copy Markdown
Collaborator

So you decided to add visibility keywords after all? I'm fine with both, but wondering whether you actually considered my arguments.

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator Author

wondering whether you actually considered my arguments.

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
ChrisonSimtian force-pushed the chore/encapsulate-build-visibility branch from dabc657 to ec7298d Compare June 22, 2026 07:38
…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
ChrisonSimtian force-pushed the chore/encapsulate-build-visibility branch from ec7298d to cae83f9 Compare June 22, 2026 08:20
@ChrisonSimtian
ChrisonSimtian enabled auto-merge (rebase) June 22, 2026 08:22
@ChrisonSimtian
ChrisonSimtian disabled auto-merge June 22, 2026 21:48
@ChrisonSimtian
ChrisonSimtian merged commit 5db2553 into main Jun 22, 2026
1 check passed
@ChrisonSimtian
ChrisonSimtian deleted the chore/encapsulate-build-visibility branch June 22, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants