Skip to content

refactor: rename assembly and package from DecoWeaver to LayeredCraft.DecoWeaver#41

Merged
ncipollina merged 2 commits intomainfrom
refactor/rename-assembly-package-layeredcraft-decoweaver
Mar 29, 2026
Merged

refactor: rename assembly and package from DecoWeaver to LayeredCraft.DecoWeaver#41
ncipollina merged 2 commits intomainfrom
refactor/rename-assembly-package-layeredcraft-decoweaver

Conversation

@ncipollina
Copy link
Copy Markdown
Contributor

Summary

Renames all assembly, package, and namespace identifiers from DecoWeaver to LayeredCraft.DecoWeaver to align with the project's full identity. This is a new package release — consumers will reference LayeredCraft.DecoWeaver.Attributes and LayeredCraft.DecoWeaver.Generators directly, with no migration path needed from the old names.

Also fixes a cross-platform CRLF/LF discrepancy that caused [InterceptsLocation] data hashes to differ between macOS and Windows, breaking snapshot tests on Windows.

Changes

Namespaces and generated code

  • DecoWeaver.AttributesLayeredCraft.DecoWeaver.Attributes
  • DecoWeaver.GeneratedLayeredCraft.DecoWeaver.Generated (Scriban template + sample project)
  • Generator hint name: DecoWeaver.Interceptors.ClosedGenerics.g.csLayeredCraft.DecoWeaver.Interceptors.ClosedGenerics.g.cs

Build infrastructure

  • DecoWeaver.props / DecoWeaver.targetsLayeredCraft.DecoWeaver.props / LayeredCraft.DecoWeaver.targets
  • MSBuild target name updated to LayeredCraft_DecoWeaver_EnableInterceptors
  • .csproj pack item paths and DLL references updated

Provider namespace pattern matching (bug fix)

  • DecoratedByGenericProvider, DecoratedByNonGenericProvider, ServiceDecoratedByProvider each had a hardcoded C# property pattern matching global::DecoWeaver.Attributes (2-level). Updated to match global::LayeredCraft.DecoWeaver.Attributes (3-level) so attribute discovery works correctly.

Snapshot tests

  • All 41 .verified.cs snapshot files renamed to match new sut=LayeredCraft.DecoWeaver.DecoWeaverGenerator#LayeredCraft.DecoWeaver.Interceptors.ClosedGenerics.g naming
  • //HintName: comment inside each snapshot updated to match new hint name

Cross-platform line ending fix

  • Added .gitattributes rules to enforce LF on *.verified.cs and test case .cs files
  • Added NormalizeLineEndings() in GeneratorTestHelpers.cs applied when reading source files into the in-memory compilation, ensuring consistent [InterceptsLocation] data hashes on both macOS and Windows

Validation

  • All 49 snapshot tests pass on net8.0, net9.0, and net10.0
  • Solution builds cleanly in Debug and Release

Release Notes

New package identities:

  • LayeredCraft.DecoWeaver.Attributes (was DecoWeaver.Attributes)
  • LayeredCraft.DecoWeaver.Generators (was DecoWeaver.Generators)

Generated interceptors now emit into namespace LayeredCraft.DecoWeaver.Generated. Consumer projects must update their <InterceptorsNamespaces> MSBuild property accordingly (handled automatically when referencing the new package via the bundled .props/.targets).

🤖 Generated with Claude Code

ncipollina and others added 2 commits March 28, 2026 21:08
…ility

Force LF line endings for test case .cs and .verified.cs files via
.gitattributes, and normalize CRLF to LF in GeneratorTestHelpers when
reading source files. Roslyn's GetInterceptableLocation() hashes the
raw source text, so CRLF on Windows produced different data values than
LF on Mac, causing snapshot mismatches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
….DecoWeaver

Renames all namespaces, generated code namespaces, build props/targets,
snapshot filenames, and hint names to align with the LayeredCraft.DecoWeaver
package identity. Also fixes a cross-platform CRLF/LF issue in test case
files that caused snapshot hash mismatches between macOS and Windows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ncipollina ncipollina merged commit f0c48b8 into main Mar 29, 2026
1 check passed
@ncipollina ncipollina deleted the refactor/rename-assembly-package-layeredcraft-decoweaver branch March 29, 2026 02:01
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