From 994e382e809ef2d59f7e68f0f9a2d98572ab6b39 Mon Sep 17 00:00:00 2001 From: Olivier Cots Date: Wed, 2 Sep 2026 00:13:30 +0200 Subject: [PATCH] docs: use qualified using for CairoMakie to satisfy meta no-import test The SVG plotting setup merged in #423 used `import CairoMakie`, which trips the `test_no_import` regression guard (Handbook tenet 2: using, never import). Use `using CairoMakie: CairoMakie, Makie` instead: it loads CairoMakie, keeps Makie's `plot`/`plot!` out of Main (no clash with Plots in `@docs` blocks), and still enables the SVG backend / disables PNG output. --- docs/make.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 7b2cbb0f..5c037108 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -65,8 +65,9 @@ using JLD2, JSON3 # plotting using Plots -import CairoMakie # `import`, not `using`: keeps Makie's `plot`/`plot!` out of Main, - # which would collide with Plots' `plot`/`plot!` in the `@docs` block on results/plot.md +using CairoMakie: CairoMakie, Makie # qualified `using`: loads CairoMakie and exposes + # CairoMakie/Makie without importing Makie's `plot`/`plot!` + # into Main (avoids clashing with Plots in `@docs` blocks). # DocumenterVitepress picks the highest-priority MIME type a plot object responds to # (image/png: 4.0 over image/svg+xml: 3.0) — the opposite of Documenter.HTML, which