Skip to content

v0.12.3

Choose a tag to compare

@github-actions github-actions released this 26 Aug 19:56
· 54 commits to main since this release

Eight changes. The first three come from Doitsu's report on MobileRead #248,
and the first of those is the report itself — reproduced, and deliberate. The
next three came from a new audit binary and from sizing an open issue,
rather than from anyone hitting them, and one of those is a false positive we
had been shipping all along. The last two are documentation, and one of them
is a promise made publicly before it was published — the wrong order, and the
reason this release is cut today rather than tomorrow.

A <script src> target stays exempt from the fallback requirement
(#97). Doitsu found that epubcheck reports RSC-032 for a .js declared
text/x-javascript and we do not. EPUB 3.4 exempts resources referenced from
<script src> — the spec editor's w3c/epubcheck#1654, accepted
and epubcheck has not implemented it yet. This is the permissive direction,
which this project ships without a flag, so nothing changes. The reason is
now written next to the list someone would edit, because widening that list
is exactly what happened while investigating the report; the test guarding
the exemption caught it within the hour.

iframe@src and input@src are now asked for a fallback, and input@src
counts as referencing its target
(#98). Asking which other references we
never posed the fallback question to found three real defects. iframe@src
was missing outright. input@src was gated on type="image", while
epubcheck's startInput registers it whatever the type is. And a third,
worse than either and reported by nobody: is_resource_reference did not
know about input@src either, so an ordinary <input type="image" src="cover.png"> drew OPF-097 claiming nothing referenced cover.png.
That one was a false positive on valid HTML5.

Two hand-maintained lists answering different questions about the same markup
had drifted apart. The element list is now a table documented against its
source — the GENERIC registrations in epubcheck's OPSHandler30 — with
script's deliberate absence recorded in the same place.

OPF-090 now names the preferred media type (#99), also Doitsu's
suggestion: media-type 'application/vnd.ms-opentype' is a non-preferred (but valid) Core Media Type; 'font/otf' is preferred. All six non-preferred types
have a row, verified against epubcheck one book at a time, including the
extension-dependent application/font-sfnt. params[0] is unchanged and the
preferred spelling is appended, so consumers indexing it are unaffected.

OPF-037 no longer fires on EPUB 3 books (#100). The deprecated
text/x-oeb1-css media type draws a warning from epubcheck on an EPUB 2 book
and nothing on an EPUB 3 one; we warned on both.

Worth the paragraph because of how it was found. OPF_037 has one call site
in epubcheck, OPFChecker.checkItem, in a base class rather than a *30 one
— so every "grep the call sites" pass classifies it as version-neutral, which
is what three separate audits did this week. What actually scopes it is one
level up: OPFChecker30 overrides checkItem without calling super, so
the EPUB 3 path never runs the base method. Same shape as OPF-042.

That is now checked mechanically rather than remembered. A new harness binary
reads epubcheck's own call sites for every ID we emit and reports the two
version-scoped classes, including the override-without-super one. It found
this on its first run.

Eleven ordinary SVG 1.1 element names were missing from our vocabulary, and
their absence was a false positive
(#93). altGlyph, altGlyphDef,
altGlyphItem, animateColor, color-profile, definition-src, the four
font-face-* names and glyphRef are all plain SVG 1.1; epubcheck accepts
every one of them and we were reporting RSC-025. Usage level, so no verdict
moved, but wrong findings on valid markup all the same.

Nothing could have found it from a book: no title on the 405-book shelf uses
SVG fonts, altGlyph or a colour profile, so compare never had the chance.
It came out of extracting the element declarations from
schema/20/rng/svg/*.rng and diffing them against our list — and the diff
was done before turning that list into an EPUB 2 error, which is the only
reason this shipped as eleven wrong usage notes rather than eleven wrong
errors.

SVG required attributes are now checked at both versions (#93). epubcheck
runs the SVG 1.1 grammar normatively for EPUB 2 and informatively for EPUB 3,
so the identical missing width is RSC-005 there and RSC-025 usage here.
Only the EPUB 2 half shipped in 0.12.2, because the gap that prompted it was
an EPUB 2 one; the EPUB 3 half was silent until the vocabulary diff went
looking. Both halves are measured against epubcheck one book per row, the two
negatives (line, which requires nothing, and a complete shape) included.

The download surface is documented and promised (docs/INTEGRATING.md).
That file specified the JSON envelope and the exit codes and said nothing
about the other half of the contract — the release archives a plugin actually
downloads. Reading the Sigil plugin's source showed it matching asset
filenames by exact string equality, which made those names an undocumented
interface. They are now written down: eight archives named after the Rust
target triple, stable, added to but never renamed. Two corrections go with
them, stated generically rather than to anyone in particular — resolve through
releases/latest rather than the first element of releases, which includes
prereleases and drafts, and do not assume a tag parses as three integers.

A second section says how often to update, and whether to update at all. A
validator is not an ordinary dependency: new checks mean a book that was clean
yesterday is flagged today with nothing changed by its author. That is correct
behaviour and still a bad surprise unannounced. Pin a version, check no more
often than every few days, and show which epubveri version produced a report.

The download steps now warn about GitHub's "Source code" archives
(docs/USAGE.md). GitHub adds two of them to every release automatically;
they contain source text rather than the program and nothing in them will run.
USAGE.md already named the right file per platform, which helps, but never
said what those extra entries were. Prompted by KevinH on MobileRead,
explaining why Sigil keeps plugin distribution off GitHub — most of his users
are not GitHub users and cannot tell a release zip from a source zip. That is
a failure mode of the release page rather than of anyone's choice, and it
applied to us too.

Full notes: CHANGELOG.md. Also on crates.io.