Skip to content

Update to odrcore 6.0.0 - #128

Merged
andiwand merged 1 commit into
mainfrom
update-odrcore-6
Jul 27, 2026
Merged

Update to odrcore 6.0.0#128
andiwand merged 1 commit into
mainfrom
update-odrcore-6

Conversation

@andiwand

@andiwand andiwand commented Jul 27, 2026

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Pulls conan-odr-index up to 36caf08, which adds the odrcore/6 recipe, and moves the app onto odrcore 6.0.0.

6.0.0 drops the pdf2htmlEX and wvWare backends and reworks the HTTP server API, so the consumer side has to move with it.

Dropped backends

with_pdf2htmlEX and with_wvWare are gone from the recipe, and both were already False here. pdf2htmlex, poppler-data and fontconfig leave the dependency graph with them, which leaves the deployer branches that copied their data into the app bundle dead — odrcore's own data is all there is left to deploy.

Nothing in the app referenced those assets: PDFs are handed to WKWebView, not to odrcore.

bind() / listen()

HttpServer::listen(host, port) is split into bind() + listen(). bind() runs on the calling thread, reports a failed bind as ServerBindFailed instead of swallowing it, and returns the port it got. That removes the reason for every socket call CoreWrapper had:

  • the bind test that checked the port was not already somebody else's
  • the readiness probe that waited for listen() to bind on the server's own thread

Connections land in the backlog from bind() onwards, so there is nothing to wait for before handing URLs to the web view.

It also removes the reason for a fixed port. Binding port 0 asks for whichever one is free and bind() reports which that was, so the two flavors of the app can no longer collide on 29665 — the failure this API change was made for. The port lives in a global now, since isServedURL: and the page URLs both need it.

Net: −94 lines in CoreWrapper.mm.

Server cache

HttpServer::Config::cache_path and config() are gone, and clear() no longer deletes files. Nothing is lost — the pages were always translated into the cache path passed to html::translate, which is the system's temporary directory. The server's own cache directory was only ever used by the serve_file that 6.0.0 removed.

Tests

The port in testOnlyTheServersOwnURLsCountAsPages is derived from the served URL rather than hardcoded, with a bare-host case (http://127.0.0.1/…) added — a URL without a port no longer reads as "not ours" for free.

Verification

  • conan/setup-all.sh — all 13 configurations resolve and build
  • bundle exec fastlane tests — 27 passing, including testPagesAreServedOverLoopback and testTheWebViewLoadsAServedPage
  • xcodebuild … -sdk iphoneosODR Full/Release and ODR Lite/Release Lite both build

conan-odr-index moves to 36caf08, which adds the odrcore/6 recipe. 6.0.0 drops
the pdf2htmlEX and wvWare backends and reworks the HTTP server API, so the
consumer side has to move with it:

- `with_pdf2htmlEX` and `with_wvWare` are gone from the recipe, and both were
  already off here. pdf2htmlex, poppler-data and fontconfig leave the
  dependency graph with them, so the deployer branches copying their data into
  the bundle are dead and go too - odrcore's own data is all that is left.

- `HttpServer::listen(host, port)` is split into `bind()` + `listen()`. bind()
  runs on the calling thread, reports a failed bind as ServerBindFailed instead
  of swallowing it, and returns the port it got. That removes the reason for
  every socket call in CoreWrapper: the bind test that checked the port was not
  somebody else's, and the readiness probe that waited for listen() to bind on
  the server's own thread. Connections are accepted from bind() onwards.

  It also removes the reason for a fixed port. Binding port 0 asks for whichever
  one is free and bind() says which that was, so the two flavors of the app can
  no longer collide on 29665 - the failure this API change was made for. The
  port is kept in a global, since `isServedURL:` and the page URLs both need it.

- `HttpServer::Config::cache_path` and `config()` are gone, and clear() no
  longer deletes files. Nothing is lost: the pages were translated into the
  cache path passed to `html::translate`, which is the system's temporary
  directory, and the server's own cache directory was only ever used by the
  `serve_file` that 6.0.0 removed.

The port in the tests is now derived from the served URL rather than hardcoded,
with a bare-host case added since a URL without a port no longer reads as
"not ours" for free.

Verified with `conan/setup-all.sh` across all 13 configurations, `fastlane
tests` (27 passing, including the loopback and web view ones), and device
Release builds of both flavors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018nJRmG9vePpssqA3jnfNv9
@andiwand
andiwand enabled auto-merge (squash) July 27, 2026 22:48
@andiwand
andiwand disabled auto-merge July 27, 2026 22:57
@andiwand
andiwand merged commit 886fd7f into main Jul 27, 2026
4 checks passed
@andiwand
andiwand deleted the update-odrcore-6 branch July 27, 2026 22:57
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