Skip to content

chore(templates): retire dead scaffolding, deprecate superseded public types for 2.0#247

Open
DemchaAV wants to merge 2 commits into
developfrom
chore/templates-dead-code
Open

chore(templates): retire dead scaffolding, deprecate superseded public types for 2.0#247
DemchaAV wants to merge 2 commits into
developfrom
chore/templates-dead-code

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

The template layer carries scaffolding that no longer earns its place: an empty
placeholder package, a package-private support class nothing reaches, dead Gen-2
sample data in the examples, and an authoring recipe that teaches superseded
renderers. Clearing it keeps the surface honest and binary-compatible.

What changed

Removed (internal, zero references):

  • templates/tables/ — placeholder package that only ever held package-info.java; no classes were built.
  • templates/builtins/BuiltInCvTemplateSupport — package-private, no callers.
  • Dead sampleCvSpecV2 / sampleCvHeaderV2 / sampleCoverLetterSpecV2 / sampleCoverLetterHeaderV2 in the examples ExampleDataFactory (uncalled), plus their now-orphaned templates.blocks / cv.spec / coverletter.spec imports — the examples module no longer depends on the deprecated Gen-2 spec surface.

Deprecated for removal (public + present in the v1.7.0 binary baseline, so removed only at the next major):

  • templates.api.CoverLetterTemplate — nothing implements it; cover-letter presets implement the generic DocumentTemplate<CoverLetterDocumentSpec> seam. Now @Deprecated(since = "1.9.0", forRemoval = true).
  • cv.v2.components.HeadlineRenderer / ContactRenderer / BannerRenderer — already-deprecated pre-widgets shims, now forRemoval; the live equivalents are the cv.v2.widgets Headline / ContactLine / SectionHeader.
  • Both recorded in the docs/api-stability.md 2.0 ledger and the CHANGELOG Deprecations section.

Docs: the cv/v2/AUTHORS.md “write a new preset” recipe now calls the real widget APIs (Headline.spacedCentered, ContactLine.centered, SectionHeader.banner) instead of the deprecated renderers; the MinimalUnderlined javadoc link, the CvDecoration comment, docs/architecture/package-map.md, and ADR-0011 are updated to match.

Lane: templates (canonical) + docs. No engine changes. No behavioral change to any shipped template — the deletions are unreferenced and the deprecations keep compiling.

Verification

  • ./mvnw -P japicmp verify -pl .BUILD SUCCESS, Tests run: 1605, Failures: 0, Errors: 0, javadoc gate clean, binary-compatibility green against the v1.7.0 baseline (no public type removed).
  • ./mvnw -f examples/pom.xml test-compile → clean; GenerateAllExamples regenerates every example PDF.

…c types for 2.0

Remove the empty tables/ placeholder package and the package-private
BuiltInCvTemplateSupport (zero references); drop the dead Gen-2 sample
methods from the examples ExampleDataFactory so examples no longer touch
the deprecated cv.spec / coverletter.spec surface. Public types that are
superseded but present in the v1.7.0 binary baseline — CoverLetterTemplate
and the cv/v2 Headline/Contact/Banner renderers — are marked
@deprecated(forRemoval) in 1.9.0 with rows in the 2.0 ledger instead of
being removed. Rewrite the AUTHORS.md recipe and stale doc references onto
the real widget APIs (Headline, ContactLine, SectionHeader).
@DemchaAV DemchaAV force-pushed the chore/templates-dead-code branch from d935bbd to a5416af Compare June 27, 2026 21:07
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