Skip to content

chore(repo): restructure src/tests/.assets layout + drop Matt-era IDE files#49

Merged
ChrisonSimtian merged 3 commits into
mainfrom
chore/p2-repo-cleanup-restructure
May 19, 2026
Merged

chore(repo): restructure src/tests/.assets layout + drop Matt-era IDE files#49
ChrisonSimtian merged 3 commits into
mainfrom
chore/p2-repo-cleanup-restructure

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Repo cleanup and reshape. No behavior change in shipping code; build, slnx, and test references are updated to track.

Structural changes

From To
source/Nuke.*/ (production) src/Nuke.*/
source/Nuke.*.Tests/ tests/Nuke.*.Tests/
images/ .assets/images/
icon.png (root) .assets/icon.png
source/Directory.Build.props Directory.Build.props (root)
source/AssemblyInfo.cs AssemblyInfo.cs (root)

Directory.Build.props was hoisted to root so both src/ and tests/ inherit via MSBuild's directory walk. Paths inside it now use $(MSBuildThisFileDirectory) so they're depth-independent. Added a ManagePackageVersionsCentrally != false condition on the SourceLink/NB.GV refs so they don't leak into _build.csproj.

Removed (Matt-era / no longer applicable)

File Why
.editorconfig 2017-vintage copy from the Roslyn repo. Relying on dotnet format defaults going forward.
nuke-common.sln.DotSettings ReSharper config — we don't use Rider/R#.
source/CodeStyle.DotSettings ReSharper code style.
source/Inspections.DotSettings ReSharper inspection severities.
.run/ (6 files) JetBrains Rider run configurations.
GitVersion.yml Referenced master/develop branches; we're on Nerdbank.GitVersioning.
external/ Orphan submodule placeholder pointing at Matt's NUKE ecosystem repos (website/promo/resharper). Not used by build. .gitignore already said ignore it.
Dockerfile Referenced dotnet/sdk:8.0 (we're on 10), not invoked by any CI workflow.

Stripped

  • TFS leftover in nuget.config (root) and src/Nuke.GlobalTool/templates/nuget.config:
    <solution>
      <add key="disableSourceControlIntegration" value="true" />
    </solution>
    Property only matters under TFVC; useless on git.

SLNX cleanup

  • Removed bogus Type="Classic C#" attribute from every <Project> entry. These are SDK-style projects; the attribute was a half-baked sln→slnx migration artifact (some projects had it, some didn't).

Docs

  • New: docs/architecture.md — canonical layout doc, linked from CLAUDE.md. Describes top-level structure, project groupings under src/, build conventions, CI layout.
  • Updated CLAUDE.md — codifies the src//tests//docs//.assets/ convention so future AI sessions track the new structure. Also drops the ReSharper/.editorconfig mentions.
  • Updated CONTRIBUTING.md — tool wrapper path source/src/.
  • Updated tests/Nuke.Common.Tests/GitHubTasksTest.cs — uses src/ in fixture paths.
  • Updated .github/workflows/ubuntu-latest.ymlpaths-ignore: images/**.assets/**.
  • Updated build/Build.CI.GitHubActions.cs — same paths-ignore change in the generator source so future regenerations stay consistent.
  • Updated CHANGELOG.md — vNext entry.

Verification

  • dotnet build nuke-common.slnx -c Debug0 warnings, 0 errors.
  • All test projects compile (build pulls them in).
  • _build.csproj builds (was the trickiest after hoisting Directory.Build.props).
  • Git tracked all moves as renames (no add/delete pairs).

Out of scope (later issues)

Test plan

  • CI passes on ubuntu-latest.
  • Visual sanity check on the GitHub README rendering with new image paths.
  • After merge: confirm windows-latest and macos-latest post-merge runs pass with the new layout.

🤖 Generated with Claude Code

ChrisonSimtian and others added 3 commits May 19, 2026 16:13
… files

Repo cleanup and reshape. No behavior change in shipping code; build + slnx
+ test references updated to track.

## Structural changes

- source/ → src/ for all production projects.
- source/*.Tests → tests/ for all test projects.
- images/ → .assets/images/; root icon.png → .assets/icon.png.
- Directory.Build.props and AssemblyInfo.cs hoisted from source/ to repo
  root so both src/ and tests/ inherit them via MSBuild's directory walk.
- nuke-common.slnx updated with new project paths.
- Test csproj ProjectReferences updated: ..\Nuke.X → ..\..\src\Nuke.X.
- _build.csproj imports / project refs: ..\source\ → ..\src\.
- PackageIcon path now uses $(MSBuildThisFileDirectory).assets\icon.png
  (depth-independent).
- AssemblyInfo include uses $(MSBuildThisFileDirectory)AssemblyInfo.cs.

## Removed (Matt-era / no longer applicable)

- .editorconfig — was a 2017-vintage copy from the Roslyn repo; relying on
  dotnet format defaults going forward.
- nuke-common.sln.DotSettings, source/CodeStyle.DotSettings,
  source/Inspections.DotSettings — ReSharper-specific.
- .run/ — JetBrains Rider run configurations.
- GitVersion.yml — referenced master/develop branches; project is on
  Nerdbank.GitVersioning.
- external/ — orphan submodule placeholder pointing at Matt's NUKE
  ecosystem repos (website, promo, resharper). Not used by build.
- Dockerfile — referenced dotnet/sdk:8.0 (we're on 10), not invoked by
  any CI workflow.

## Stripped

- TFS leftover in nuget.config (root) and src/Nuke.GlobalTool/templates/
  nuget.config: <solution><add key="disableSourceControlIntegration"/></solution>.
  That property only matters under TFVC; useless on git.

## SLNX cleanup

- Removed bogus Type="Classic C#" attribute from every <Project> entry.
  These are SDK-style projects; the attribute was a half-baked sln→slnx
  migration artifact.

## Docs

- New: docs/architecture.md — canonical layout doc, linked from CLAUDE.md.
- Updated: CLAUDE.md — codifies the src/tests/docs/.assets convention so
  future AI sessions track the new structure. Also drops the
  ReSharper/editorconfig conventions.
- Updated: CONTRIBUTING.md — tool wrapper path source/ → src/.
- Updated: tests/Nuke.Common.Tests/GitHubTasksTest.cs — uses src/ in
  fixture paths.
- Updated: .github/workflows/ubuntu-latest.yml — paths-ignore: images/**
  → .assets/**.
- Updated: build/Build.CI.GitHubActions.cs — same paths-ignore change in
  the generator source.
- Updated: CHANGELOG.md vNext.

## Verified

- dotnet build nuke-common.slnx -c Debug: 0 warnings, 0 errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI failures came from 5 test files with hardcoded "source" path segments
that needed to track the directory rename:

- tests/Nuke.Build.Tests/CompletionUtilityTest.cs       source/Nuke.Build.Tests → tests/Nuke.Build.Tests
- tests/Nuke.Common.Tests/ChangelogTasksTest.cs         source/Nuke.Common.Tests → tests/Nuke.Common.Tests
- tests/Nuke.Common.Tests/SettingsTest.cs               source/Nuke.Common → src/Nuke.Common (production code)
- tests/Nuke.GlobalTool.Tests/CakeConversionTests.cs    source/Nuke.GlobalTool.Tests → tests/Nuke.GlobalTool.Tests
- tests/Nuke.Tooling.Tests/NuGetPackageResolverTest.cs  source/Nuke.Tooling.Tests → tests/Nuke.Tooling.Tests

Local `dotnet test nuke-common.slnx` now passes for all 5 affected
projects (213 passed, 7 skipped, 0 failed).

The .verified.cs files under tests/Nuke.GlobalTool.Tests/cake-scripts/
still contain "source" — those are Verify.Xunit snapshots of expected
Cake-to-NUKE conversion output and shouldn't change just because the
repo's directory name did.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI Pack failed because the changelog content was passed to MSBuild as
-p:PackageReleaseNotes=<value> but the value contained ; characters,
which MSBuild's property parser interprets as list separators. The
parser then split the long release note into multiple bogus arguments
and crashed with "MSB1006: Property is not valid. Switch: test
projects moved to tests/".

Two fixes:

1. ChangeLogTasks.GetNuGetReleaseNotes now URL-encodes ; → %3B in
   addition to the existing , → %2C escaping. This was a latent bug;
   it only surfaces when a changelog bullet contains a semicolon.
2. The vNext CHANGELOG.md entry reformatted to use . instead of ;
   as belt-and-suspenders. The bug fix above is the real solution but
   keeping the changelog change so this PR can land without depending
   on the new bug-fix code being deployed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit 5a1f4c9 into main May 19, 2026
1 check passed
@ChrisonSimtian
ChrisonSimtian deleted the chore/p2-repo-cleanup-restructure branch May 19, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant