Skip to content

Add a shading guide to the site - #61

Merged
garydgregory merged 2 commits into
apache:mainfrom
ppkarwasz:docs/shading-guide
Aug 30, 2026
Merged

Add a shading guide to the site#61
garydgregory merged 2 commits into
apache:mainfrom
ppkarwasz:docs/shading-guide

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

Adds a shading.md site page documenting that the Secure* entry points are designed as independent shade closures:

  • a table of per-entry-point shaded size estimates (uncompressed closure bytes from the sets pinned by ShadingFootprintTest, scaled by the jar's overall compression ratio; measured on 1.0.0),
  • the security trade-offs of the three consumption models (external dependency, recommended; shaded copy; vendored code and copy-pasted recipes, with throw on unsupported properties and newDefaultInstance() as mitigations),
  • a maven-shade-plugin configuration that relocates commons-xml alone while leaving other dependencies external.

Also fixes ShadingFootprintTest.reportFootprint() to compute its percentages against the union of all entry-point closures, matching its "% of full library" header (previously it divided by the DOM closure only).

The page follows the site conventions: semantic line breaks, ASF license header, .html cross-links; site.xml gains a "Shading" menu item. Verified with mvn test -Dtest=ShadingFootprintTest, mvn apache-rat:check, and a full mvn site render.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MbfpcsKig16HfSe6jGhcvh

Document that the Secure* entry points are designed as independent shade
closures: per-entry-point shaded size estimates, the security trade-offs
of dependency vs. shading vs. vendored recipes, and a maven-shade-plugin
configuration that relocates commons-xml alone.

Also make the ShadingFootprintTest report compute its percentages
against the union of all entry-point closures, matching its
"% of full library" header.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MbfpcsKig16HfSe6jGhcvh

@garydgregory garydgregory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved documentation to the Javadoc side so it always matches the code. This can go there as well.

Comment thread src/site/site.xml Outdated
@ppkarwasz
ppkarwasz requested a review from garydgregory August 30, 2026 13:57
@garydgregory
garydgregory merged commit da4d44c into apache:main Aug 30, 2026
18 checks passed
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