Skip to content

docs: fix unresolvable @extref in _strategy_parameter docstring (#943) - #944

Merged
ocots merged 1 commit into
mainfrom
fix/parameter-extref-943
Sep 2, 2026
Merged

docs: fix unresolvable @extref in _strategy_parameter docstring (#943)#944
ocots merged 1 commit into
mainfrom
fix/parameter-extref-943

Conversation

@ocots

@ocots ocots commented Sep 2, 2026

Copy link
Copy Markdown
Member

Closes #943.

Problem

The _strategy_parameter docstring (src/helpers/print.jl) cross-referenced CTBase's
parameter function by method signature:

[`CTBase.Strategies.parameter(T, default)`](@extref) — the non-throwing counterpart to
[`CTBase.Strategies.parameter(T)`](@extref) requested as [CTBase#518](…)

Neither link resolves. CTBase's auto-generated API reference documents Strategies.parameter
as a single jl:function — one inventory anchor, CTBase.Strategies.parameter, no
per-method signature. A signature-suffixed @extref only resolves when the target docs
split the docstring per method with a @docs block, which CTBase does not do (its #543 fix
just rewrote CTBase's own prose to drop the suffix — it did not add per-method anchors).

These 2 links were 2 of the 6 @extref errors in the
warnonly=[:cross_references, :external_cross_references] backlog, on the generated
api/internals.md. The docs/make.jl comment attributed them to CTBase#543, now closed.

Fix

Verification

Local docs build (julia --project=. docs/make.jl), against CTModels#428:
ExtCrossReferences reports 0 unresolved @extref (was 6). CrossReferences,
CheckDocument, RenderDocument all pass; build exits 0.

The other 4 @extref (Plots.plot(::CTModels.Solutions.Solution)) are owned by
control-toolbox/CTModels.jl#428; this PR clears its own 2 regardless of that landing.

Once CTModels 0.19.4-beta is in docs/Manifest.toml, :external_cross_references can be
dropped from warnonly (separate follow-up) so a future unresolved @extref fails the
build.

Documentation-only; no API or behaviour change.

🤖 Generated with Claude Code

The `_strategy_parameter` docstring cross-referenced CTBase's `parameter`
function by method signature — `parameter(T, default)` and `parameter(T)` —
but CTBase's auto-generated reference indexes `Strategies.parameter` under a
single function anchor, with no per-method signature. Neither link resolved.
Same anti-pattern CTBase removed from its own docstrings in CTBase#543.

Collapsed both to the single `[`CTBase.Strategies.parameter`](@extref)` anchor,
keeping the prose that distinguishes the one- and two-argument forms. Refreshed
the `docs/make.jl` warnonly comment: CTBase#543 and CTModels#416 are closed;
the residual @extref were (a) this docstring, fixed here, and (b) CTModels'
extension docstrings (CTModels#427, fixed in CTModels 0.19.4-beta).

Verified: docs build ExtCrossReferences step reports 0 unresolved @extref
(was 6). Documentation-only; no API or behaviour change; no version bump.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ocots ocots added documentation Improvements or additions to documentation run documentation Trigger the Documentation workflow on this PR labels Sep 2, 2026
@ocots
ocots merged commit d7f6959 into main Sep 2, 2026
14 checks passed
@ocots
ocots deleted the fix/parameter-extref-943 branch September 2, 2026 13:37
ocots added a commit that referenced this pull request Sep 2, 2026
Both cross-reference backlogs are cleared:
- @extref: `_strategy_parameter` (#944) + CTModels' extension docstrings
  (CTModels.jl#428, shipped in CTModels 0.19.4-beta)
- @ref/DOCPCache: CTDirect#630 (closed)

So `makedocs` no longer needs `warnonly` — an unresolved `@ref`/`@extref`, or a
broken `@example`/`@repl`, now fails the build. Verified with the sibling
inventories forced to resolve remotely (as on CI): full build, exit 0, zero
unresolved references.

Also:
- docs env moves to CTBase 0.30.4-beta + CTModels 0.19.4-beta;
  docs/src/assets/Manifest.toml regenerated.
- Project.toml 2.2.0-beta -> 2.2.1-beta (docs-infra patch, no API/runtime
  change); CHANGELOG + BREAKING get a 2.2.1-beta section collecting this plus
  the already-merged #944 (extref), #949 (draft=false default) and #951
  (CI-only remote inventories).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation run documentation Trigger the Documentation workflow on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_strategy_parameter docstring @extrefs CTBase.Strategies.parameter with a method signature the inventory does not index

1 participant