Skip to content

fix docstring (markdown issue, no review required)#1438

Merged
shravanngoswamii merged 1 commit into
mainfrom
sg/fix-docstring
Jul 16, 2026
Merged

fix docstring (markdown issue, no review required)#1438
shravanngoswamii merged 1 commit into
mainfrom
sg/fix-docstring

Conversation

@shravanngoswamii

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

DynamicPPL.jl documentation for PR #1438 is available at:
https://TuringLang.github.io/DynamicPPL.jl/previews/PR1438/

@shravanngoswamii

Copy link
Copy Markdown
Member Author

I cancelled all CI tests to avoid wasting resources on this.

@shravanngoswamii
shravanngoswamii merged commit e9e3afe into main Jul 16, 2026
3 of 23 checks passed
@shravanngoswamii
shravanngoswamii deleted the sg/fix-docstring branch July 16, 2026 15:04
shravanngoswamii added a commit that referenced this pull request Jul 17, 2026
main's Doctests workflow is currently red:
https://github.com/TuringLang/DynamicPPL.jl/actions/runs/29509495151/job/87658917625

#1438 fixed a real markdown bug (an unclosed \`\`\` fence in
`check_model`'s docstring), which is good, but closing that fence
changed where Documenter thinks the `jldoctest` block ends. That exposed
a doctest that was already stale: the "Incorrect model" example expected

```
julia> check_model(model; error_on_failure=true)
ERROR: varname x used multiple times in model
```

but `check_model`'s actual behavior for repeated `VarName`s (since at
least the `DebugAccumulator` rework) is to `@warn` per repeated variable
and then raise the generic `error_on_failure` message at
`src/debug_utils.jl:265-266`:

```
julia> check_model(model; error_on_failure=true)
┌ Warning: Assigning to the variable x led to a previous value being overwritten. This indicates that a value is being set twice (e.g. if the same variable occurs in a model twice).
└ @ DynamicPPL.DebugUtils DynamicPPL.jl/src/debug_utils.jl:237
ERROR: Model check failed; please see the warnings above for details.
```

Updated the docstring to match, mirroring the same warning-block style
already used in the "Correct model" example just above it. Verified
locally: `GROUP=Doctests julia --project=. -e 'using Pkg; Pkg.test()'`
passes (1/1) on Julia 1.12, matching the CI job that was failing.
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