Skip to content

Pkg.test() aborts in precompile: GraphViz extension fails to initialize on Julia 1.12 (libgvc UndefVarError) #313

Description

@docxology

Summary

Pkg.test() aborts during precompilation because the weak-dep extension
GraphPPLGraphVizExt fails to load. The error originates inside GraphViz.jl's own
__init__:

InitError: UndefVarError: `libgvc` not defined in `GraphViz`
  [2] __init__() ... GraphViz.jl:206
  [3] top-level scope ... GraphPPLGraphVizExt.jl:2

This is an upstream GraphViz.jl / Julia-1.12 platform incompatibility (libgvc loading),
pulled in via the test target (Project.toml [targets] test = [..., "GraphViz", ...]),
not a defect in GraphPPL's inference logic. Consequence: the CI gate cannot be reproduced
locally on 1.12, and the extension's own behaviour is never exercised.

(On the audit machine, Pkg.precompile() succeeds for the core package; Pkg.test() fails
at the extension. Core @testitem files run fine when the extension is not loaded.)

Suggested fix

  • Preferable: pin GraphViz to a version that initialises on Julia 1.12, or ensure the
    GraphViz jll/libgvc is present.
  • Resilient: guard the extension's top-level GraphViz.Context creation in a
    try/catch with a @warn so a broken optional dependency degrades instead of aborting
    the whole test run.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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