From 923b282cf53fa33510df3097e182f3f2cc730bb5 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Thu, 23 Jul 2026 06:26:55 -0400 Subject: [PATCH] docs: disable code coverage for the docs build to fix the ispure doctest The SciML reusable docs workflow defaults `coverage: true`, which runs `julia --project=docs --code-coverage=user docs/make.jl`. Coverage instrumentation inserts side-effecting per-line counter writes into every compiled method, so `Base.infer_effects` reports every function -- including the `_effects_capable` probe and the doctest's `x -> x^2 + 1` -- as not effect-free. `ispure` therefore soundly returns `false` under coverage, which fails the `ispure(x -> x^2 + 1, 2.0) == true` doctest in src/effects.jl and terminates the docs build. This is not a runtime regression: `ispure` returns `true` in any normal (non-instrumented) run, which is how the library is actually used. The doctest was newly enabled in #74 (doctest = true), which is when the docs build began failing. Coverage from a doctest-only build is meaningless, so turn it off for the docs job; the doctest then evaluates real behavior and passes without any warnonly/skip. Verified locally: with --code-coverage=user, `ispure(x -> x^2 + 1, 2.0)` returns false; without it, Documenter `doctest(FunctionProperties)` passes 1/1. Co-Authored-By: Chris Rackauckas --- .github/workflows/Documentation.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 785116e..c09546e 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -16,3 +16,10 @@ jobs: name: "Documentation" uses: "SciML/.github/.github/workflows/documentation.yml@v1" secrets: "inherit" + with: + # Code-coverage instrumentation inserts side-effecting per-line counter writes into every + # compiled method, so `Base.infer_effects` reports every function as not effect-free. That + # makes `ispure` (and the `_effects_capable` probe it depends on) return `false` under + # coverage, which breaks the `ispure` doctest in src/effects.jl. Coverage collected from a + # doctest build is meaningless anyway, so disable it for docs. + coverage: false