Skip to content

docs: read the sibling packages' local inventories only on request - #1075

Merged
ocots merged 1 commit into
mainfrom
docs/local-inventories-on-request
Nov 15, 2026
Merged

ocots merged 1 commit into
mainfrom
docs/local-inventories-on-request

Conversation

@ocots

@ocots ocots commented Nov 15, 2026

Copy link
Copy Markdown
Member

Refs control-toolbox/ct-conventions#69 (SITE4).

Problem

Outside CI, docs/make.jl listed each sibling's local build (../<Sibling>/docs/build/1/objects.inv) before its published inventory. InterLinks takes the first source that loads for the whole package, so an old local build shadows the published inventory. With an old ../CTModels.jl/docs/build/1 (0.19.7, against 0.21.1 published) and ../CTFlows.jl/docs/build/1 (0.18.0-beta, against 0.18.3), a plain local build stopped on four @extrefs that CI resolves:

CTFlows.Flows.label, CTModels.Models.constraint_rows,
CTModels.Solutions.has_dual, CTModels.Solutions.EmptySwitchingModel
→ makedocs encountered an error [:external_cross_references]

Setting CI=true to skip the local inventories is no workaround: DocumenterVitepress then builds for the /OptimalControl.jl/ prefix (!haskey(ENV, "CI")), and the local preview served from docs/build/1 returns 404 for every asset.

Change

  • By default, every sibling resolves against its published inventory, as on CI. IN_CI is gone.
  • CT_LOCAL_INVENTORIES=true julia --project=docs docs/make.jl reads the local builds first, for cross-repository development before a release; the build then names each local inventory and its version (@info), so a stale one shows.
  • A missing local file falls back to the published inventory without a warning (docs: silence the 7 DocumenterInterLinks local-inventory warnings in CI #950).

Verification

With a stale CTModels inventory (0.19.7) placed as a sibling build, draft = true:

Build Result
julia --project=docs docs/make.jl ✅ builds
CT_LOCAL_INVENTORIES=true julia --project=docs docs/make.jl ❌ the three CTModels @extrefs, with InterLinks: local inventory of CTModels.jl (version 0.19.7) in the log

Changelog: one bullet under 📚 Documentation of [Unreleased]; release.jl lint-changelog is green.

🤖 Generated with Claude Code

A local build read ../<Sibling>/docs/build/1/objects.inv before the published
inventory. InterLinks takes the first source that loads for the whole package,
so an old local build (CTModels 0.19.7 against 0.21.1 published) shadowed the
published inventory and broke every @extref added since. The local builds are
now read only with CT_LOCAL_INVENTORIES=true, and the build names each one and
its version. Refs control-toolbox/ct-conventions#69.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ocots
ocots marked this pull request as ready for review November 15, 2026 08:32
@ocots
ocots merged commit de1884a into main Nov 15, 2026
4 checks passed
@ocots
ocots deleted the docs/local-inventories-on-request branch November 15, 2026 08:32
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