Skip to content

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

Description

@ocots

What

The _strategy_parameter docstring in src/helpers/print.jl:335-336 cross-references
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, with 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 (and its own #543 fix
did not add per-method anchors — it just rewrote CTBase's prose to drop the suffix).

So this is our bug: the _strategy_parameter docstring replicates exactly the anti-pattern
that CTBase#543 removed from CTBase.

Where it fires

docs/make.jl build → expand_extrefs.jl:93, on the generated api/internals.md
(_strategy_parameter is documented there). 2 of the 6 @extref errors in the
warnonly=[:cross_references, :external_cross_references] backlog — the make.jl comment
(docs/make.jl:266-271) currently attributes them to CTBase#543, which is closed.

The other 4 are CTModels (control-toolbox/CTModels.jl#427).

Fix

Collapse the two suffixed links to the single function anchor, keeping the prose that
distinguishes the two forms:

the two-argument form of [`CTBase.Strategies.parameter`](@extref) — the non-throwing
counterpart to its one-argument form ([CTBase#518](…))

and refresh the docs/make.jl:266-271 comment. Documentation-only; no API or behaviour
change; no version bump.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions