feat(html): translate without a cache path - #663
Merged
Conversation
This was referenced Aug 8, 2026
andiwand
force-pushed
the
feat/html-no-cache-path
branch
from
August 8, 2026 18:03
d51778f to
c485e8f
Compare
`html::translate` has taken a `cache_path` on every overload, documented as "the directory temporary output goes into". Nothing goes into it. All seven `create_*_service` factories had already marked the parameter unused — media included, which was the last plausible candidate — so the only thing the public wrapper did with it was `create_directories` on a directory nobody subsequently wrote into. Add an overload per `translate` without it, and drop the parameter from the internal factories rather than only from the public surface. That is the point: with it gone from the factories, "no renderer writes to disk" stops being a coincidence and becomes structural. The only `std::filesystem` left in `html.cpp` is inside `bring_offline`, which writes to disk by definition. The `cache_path` overloads stay, as forwards, and are deliberately not marked `[[deprecated]]`: CI builds with `-Werror` and `cli/`, `python/`, `jni/` and `apple/` all still pass one. Deprecation follows once they are migrated. Behaviour change: `translate` no longer creates the directory it was handed. Nothing reads or writes there, and `cli/src/server.cpp` — the only caller that cares where its cache lives — already creates its own. If rendering ever does want a cache — PDF page backgrounds being the obvious candidate, expensive and re-rendered per view — the injection point is an `abstract::Filesystem`, not a path: `VirtualFilesystem` keeps it off the disk and out of `std::filesystem` entirely. Not a `cache_path` string again. Reference output is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BjFJ66sma1ye9ZnhM3tNeH
andiwand
force-pushed
the
feat/html-no-cache-path
branch
from
August 8, 2026 18:26
c485e8f to
f0edaed
Compare
andiwand
enabled auto-merge (squash)
August 8, 2026 18:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
Split out of #661 — no wasm in here. Stacked on #662.
html::translatehas taken acache_pathon every overload, documented as "thedirectory temporary output goes into". Nothing goes into it. All seven
create_*_servicefactories had already marked the parameter unused — mediaincluded, which was the last plausible candidate — so the only thing the public
wrapper did with it was
create_directorieson a directory nobody subsequentlywrote into.
This adds an overload per
translatewithout it, and drops the parameter fromthe internal factories rather than only from the public surface. That is the
point: with it gone from the factories, "no renderer writes to disk" stops being
a coincidence and becomes structural. The only
std::filesystemleft inhtml.cppis insidebring_offline, which writes to disk by definition.The
cache_pathoverloads stay, as forwards, and are deliberately not[[deprecated]]: CI builds with-Werrorandcli/,python/,jni/andapple/all still pass one.Behaviour change:
translateno longer creates the directory it was handed.Nothing reads or writes there, and
cli/src/server.cpp— the only caller thatcares where its cache lives — already creates its own.
Reference output unchanged; full suite green.