Skip to content

Refresh the Annotation File Utilities documents from the latest zip - #115

Open
wmdietl wants to merge 1 commit into
masterfrom
site-afu-docs
Open

wmdietl wants to merge 1 commit into
masterfrom
site-afu-docs

Conversation

@wmdietl

@wmdietl wmdietl commented Oct 10, 2026

Copy link
Copy Markdown
Member

Problem. afu/annotation-file-utilities.html links to annotation-file-format.{html,pdf}, changelog.html, figures/tool-relations.svg and figures/scene-lib-type-hierarchy.svg. getAFU copied only the format specification, only when afu/ lacked it, and only from <release>/annotation-file-utilities/ inside the zip. The annotation-tools-*.zip assets have annotation-file-utilities/ at the top level (checked for 3.49.5-eisop1), so nothing is ever copied. On the live site:

The extraction also swallowed ZipException.

Fix. A new extractAfuDocs copies the specification (HTML and PDF), changelog.html and figures/*.{svg,png} out of the latest AFU zip on every run, matching entries whether annotation-file-utilities/ is at the top of the zip or one directory down (the layout of the annotation-file-utilities-VERSION.zip built by the Checker Framework). Documents the zip lacks (for example changelog.html in the new zips) keep their earlier copy. Read errors now fail the run instead of being printed and ignored.

This touches a part of getAFU that #112 does not change; a test merge with afu-in-cf-release is clean.

Testing. mvn package; a generator run with --only-latest now extracts the five documents from annotation-tools-3.49.5-eisop1.zip into afu/. A hand-made zip with the newer layout (annotation-file-utilities-X/annotation-file-utilities/...) extracts the specification and figures, ignores other files (including a tests/.../changelog.html and a nested figures/sub/ entry), and keeps an existing changelog.html.

Note: the AFU zip built by the Checker Framework (annotationFileUtilitiesZip in the integrate-afu work) includes *.png but not figures/*.svg, so the figures would come only from the older zips until that zip includes them.

The AFU page links to the file format specification, the changelog, and
two figures in afu/.  The generator copied only the specification, only
when afu/ did not have it yet, and only from
<release>/annotation-file-utilities/ inside the zip.  The annotation-tools
zips have annotation-file-utilities/ at the top, so nothing was copied: the
specification on the site is from an old release, and afu/changelog.html
and afu/figures/*.svg are not on the site at all (both return 404).  The
extraction also swallowed a ZipException.

Copy the specification (HTML and PDF), changelog.html and figures/ from the
latest zip on every run, whether annotation-file-utilities/ is at the top
of the zip or inside a release directory, as in the zips built by the
Checker Framework.  A document that the zip lacks keeps its earlier copy.
Read errors now fail the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 10, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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