Skip to content

Document the slice API and regenerate the guide's slice diagrams - #517

Open
alexanderlinne wants to merge 2 commits into
match-slice-patterns-with-regexfrom
add-slice-xml-docs
Open

alexanderlinne wants to merge 2 commits into
match-slice-patterns-with-regexfrom
add-slice-xml-docs

Conversation

@alexanderlinne

Copy link
Copy Markdown
Collaborator

XML documentation

#515 and #516 document SliceRuleInitializer and SliceIdentifier, where the pattern syntax and the naming live. The first commit documents the rest of the public slice API, so that IntelliSense explains every type a slice rule passes through:

  • Slice: what a slice is, its identifier, types and name.
  • SliceIdentifierComparer: when two identifiers belong to the same slice.
  • SliceRuleDefinition, GivenSlices, SlicesShould and SliceRule: the steps of the fluent rule, including GivenSlices.GetObjects, which returns the slices for diagram generation.
  • SliceAssignment: how types are mapped to slices and grouped.
  • SliceRuleCreator: how the assignment and the evaluation are wired together.

Guide diagrams

The slice diagrams in guide sections 5.1–5.6 (documentation/docs/diagrams/archUnitNet_*.svg) were last generated in 2020 and 2022 and already didn't match main. Three PRs of the stack change what they show:

So the second commit regenerates them once, after the last behaviour change. Each diagram comes from the guide's own code snippet, run against the ArchUnitNET assembly. The 5.4 snippets elide their options, so they keep 5.2's NestSlicesInPackages, as the old diagrams did. The exporter's .puml output is committed next to each SVG, as for the other guide diagrams, so the next change can regenerate them. The SVGs were rendered with PlantUML 1.2025.4 and Graphviz, with the remote !include of C4-PlantUML replaced by PlantUML's bundled copy (!include <C4/C4_Container>).

@alexanderlinne
alexanderlinne added this pull request to stack #514 October 30, 2026 20:01
@alexanderlinne
alexanderlinne marked this pull request as ready for review October 30, 2026 20:03
@codecov-commenter

codecov-commenter commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.48%. Comparing base (f702e73) to head (c8838f8).

Additional details and impacted files
@@                       Coverage Diff                        @@
##           match-slice-patterns-with-regex     #517   +/-   ##
================================================================
  Coverage                            86.48%   86.48%           
================================================================
  Files                                  261      261           
  Lines                                12679    12679           
  Branches                              1231     1231           
================================================================
  Hits                                 10966    10966           
  Misses                                1366     1366           
  Partials                               347      347           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Alexander Linne <alexander.linne@tngtech.com>
The slice diagrams in guide sections 5.1 to 5.6 were last generated in
2020 and 2022 and no longer matched what the exporter draws: slices are
now named "Slice ..." after their captures, nested at the namespace their
types share, and patterns such as "ArchUnitNET.(*).(*)" produce other
slices since they are matched like ArchUnit's.

Regenerate them from the guide's own code snippets, run against the
ArchUnitNET assembly. The 5.4 snippets elide their options, so they keep
5.2's NestSlicesInPackages, as the old diagrams did. The exporter's
.puml output is committed next to each SVG, as for the other guide
diagrams, so the next change can regenerate them. The SVGs were rendered
with PlantUML 1.2025.4 and Graphviz, with the remote C4-PlantUML include
replaced by PlantUML's bundled copy.

Signed-off-by: Alexander Linne <alexander.linne@tngtech.com>

This branch has not been deployed

No deployments
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.

2 participants