Version / commit
v0.9.77 (v8 @ 5c7b847)
Environment
macOS, Python 3.13, clean checkout of v8.
What happens
A parametric type declaration is dropped from the graph entirely — no node, and for the subtyping form no inherits edge either. The non-parametric forms (struct Box, abstract type Shape, Dog <: Animal) all work; only the {...} parameter list breaks it. Parametric types are the backbone of generic Julia.
Minimal reproduction
# params.jl
struct Box{T}
value::T
end
abstract type Shape{T} end
struct Sq{T} <: Shape{T}
end
from graphify.extract import extract_julia
r = extract_julia("params.jl")
print([n["label"] for n in r["nodes"]])
# -> ['params.jl'] # Box, Shape, Sq all missing
Expected vs actual
- Expected:
Box, Shape, and Sq nodes, with Sq --inherits--> Shape.
- Actual: none of the three types appear.
Root cause
The type-head reader only recognises a plain identifier. A parametric head is a parametrized_type_expression (its leading identifier is the real name), which matched neither the bare nor the binary_expression (subtyping) branch, so the name came back None and the type was skipped.
A clean checkout of v8 reproduces it. Fix PR to follow.
Version / commit
v0.9.77 (v8 @ 5c7b847)
Environment
macOS, Python 3.13, clean checkout of
v8.What happens
A parametric type declaration is dropped from the graph entirely — no node, and for the subtyping form no inherits edge either. The non-parametric forms (
struct Box,abstract type Shape,Dog <: Animal) all work; only the{...}parameter list breaks it. Parametric types are the backbone of generic Julia.Minimal reproduction
Expected vs actual
Box,Shape, andSqnodes, withSq --inherits--> Shape.Root cause
The type-head reader only recognises a plain
identifier. A parametric head is aparametrized_type_expression(its leadingidentifieris the real name), which matched neither the bare nor thebinary_expression(subtyping) branch, so the name came backNoneand the type was skipped.A clean checkout of
v8reproduces it. Fix PR to follow.