Repository navigation
Releases
v0.11.0
Highlights
- Migrated to
github.com/apstndb/spannerplan v0.3.0and its occurrence-aware parent-link API. - Corrected edge labels when an Apply operator references the same child more than once or when an invisible scalar child precedes a visible relational child.
Security
- Updated
golang.org/x/imageto v0.43.0, fixing six reachable image-decoder vulnerabilities reported bygovulncheck.
Breaking change
Go 1.25 or newer is now required. The security-fixed golang.org/x/image and golang.org/x/text versions require Go 1.25, so this compatibility change is released as a ZeroVer minor version.
Migration
Consumers should use github.com/apstndb/spannerplan v0.3.0. Callers that inspect parent edges must preserve the raw parent.ChildLinks position when calling QueryPlan.LinkTypeInParent.
Validation
- GitHub test, lint, and CodeQL checks passed on the migration PR.
- Local
go test ./...,go vet ./...,go mod verify, golangci-lint, andgovulncheck ./...passed.
v0.10.2
v0.10.2
D2 label typography fix. Only the D2 backend's output changes; Mermaid/DOT/SVG outputs are untouched.
Fixed
d2package (#61): label lines now join with CommonMark hard line breaks inside a single paragraph instead of blank-line-separated paragraphs, removing the excessive line spacing (sample plan node heights shrink ~28%). Italic stat/summary lines with leading indentation previously failed CommonMark emphasis parsing and rendered with literal underscores (_ num_executions: 1_); the indentation now sits outside the emphasis markers (preserved visually with non-breaking spaces) and the trimmed content italicizes correctly. The query node's stat lines get the same treatment.
v0.10.1
v0.10.1
New D2 backend and a backend-neutral graph IR. Additive only: all existing rendered output (Mermaid, DOT, SVG goldens, tooltips) is byte-identical to v0.10.0.
Added
d2package (#60):Source,SourceWithOptions,NewRendereremit D2 source text — markdown labels (bold title, italic stats), nativetooltipattributes carrying the canonical plan YAML,style.stroke-dashfor remote-call edges, and an optional query-text node. Render with the d2 toolchain, e.g.spannerplanviz --type d2 ... > plan.d2 && d2 plan.d2 plan.svg. Output is validated against d2 v0.7.x in tests when the binary is available.- CLI:
--type d2(#60). mermaid: optional query-text node viaOptions.ShowQuery/ShowQueryStats(#60) — previously these flags were honored only by the Graphviz path; default remains off, so existing output is unchanged.visualize.BuildGraph(#59): resolves a plan into the internal backend-neutral graph model consumed by the dot/mermaid/d2 serializers (structure, labels, tooltips, edge styles, optional query text). Serializers now own only traversal order, markup, and escaping.
Internal
internal/graphmodel(#59): graph-scope IR (the analog of the v0.9.2 label IR); the per-node label IR moved there. Pure refactor — every golden byte-identical.
v0.10.0
v0.10.0
The dot package becomes the single source of truth for graph construction, and CLI --type dot output changes. Minor version bump per this module's policy: rendering output changes are breaking events.
Breaking
--type dotnow emits pure, unlaid-out DOT source generated by thedotpackage (nopos/bb/layout attributes), instead of Graphviz's layout-annotated-Tdotoutput. The graph semantics are identical; pipe through Graphviz yourself for laid-out output (e.g.spannerplanviz --type dot ... | dot -Tsvg). DOT output also no longer loads the embedded Graphviz/WASM runtime, so it is faster and lighter.
Changed
- The
graphvizpackage (svg/png) now renders by parsing thedotpackage's output (dot.SourceWithOptions→ParseBytes→ layout) instead of constructing a cgraph directly (#56). SVG output is byte-identical (goldens unchanged); the duplicated construction path and its structural parity test are removed, replaced by a quoting/escaping regression test over a special-characters profile.
Notes
- Library API unchanged;
graphviz.DOTremains available for runtime-Tdotrendering viagraphviz.NewRendererif the old behavior is needed programmatically.
v0.9.3
v0.9.3
Tooltips now render the canonical protojson-over-YAML representation of each plan node, and the YAML dependency stack is unified on goccy/go-yaml. No API changes; diagram structure and labels are unchanged.
Changed
- Node tooltips (Graphviz SVG
title/tooltipattributes and DOTtooltipattributes) switch from a reflection-based YAML dump to the canonical protojson-over-YAML rendering viagithub.com/apstndb/protoyamlv0.1.0 (#55): camelCase proto field names (displayName,childLinks,executionStats), named enums (kind: RELATIONAL), and protojson field-number ordering. Keys insidemetadata/executionStatsare plan data and are unchanged. Diffs are confined to tooltip text; goldens regenerated accordingly.
Dependencies
- Dropped
sigs.k8s.io/yaml(direct) and, transitively, the archivedgopkg.in/yaml.v2— the module's YAML handling is now unified on goccy/go-yaml. - Added
github.com/apstndb/protoyaml v0.1.0.
v0.9.2
v0.9.2
Dependency update and an internal refactor. No breaking changes; all rendered output (Mermaid, Graphviz, DOT goldens) is byte-identical to v0.9.1.
Changed
- Bump
github.com/apstndb/spannerplanfrom v0.1.11 to v0.2.0 (#53). No rendering output changes; goldens unchanged. - Internal: Mermaid and Graphviz label assembly now share a single backend-neutral intermediate representation built from
getNodeContent; the per-backend emitters own only escaping and markup (#54). Public API (MermaidLabel,Metadata,HTML) is unchanged.
v0.9.1
v0.9.1
New dot package for generating Graphviz DOT source text without a Graphviz runtime, plus a fix for a stray edge label in --show-query output. No breaking changes.
Added
dotpackage:Source,SourceWithOptions,NewRenderer,Options. Emits DOT source describing the same graph as thegraphvizpackage (same nodes, edges, attributes, and traversal order) while depending only onvisualize— nogoccy/go-graphviz, wazero, or font stack. Intended for embedders that lay out the graph elsewhere, such as a browser-side Graphviz build (used by rendertree-web to shrink its Go WASM binary).- Structural parity tests: both outputs are parsed with Graphviz and compared (nodes, edges, semantic attributes), plus a
dca_profile.golden.dotgolden.
Fixed
graphvizpackage: the query-text edge (--show-query/--show-query-stats) no longer renders a straynode0->querytext label. Once regular edges declared the label attribute, cgraph's default"\E"leaked onto the label-less query edge and Graphviz expanded it to the edge name. The query edge now sets an explicit empty label; the SVG golden is regenerated.
Notes
- Library API remains experimental per README; this release is additive.
- CLI behavior is unchanged except for the fixed stray label;
--type dotstill renders through the Graphviz runtime for byte-stable output.
v0.9.0
v0.9.0
Library API refactor for reusable plan building and dedicated Mermaid/Graphviz renderers, with browser-friendly Mermaid output for WASM/embedder consumers such as rendertree-web.
Breaking
- Removed
visualize.RenderImage,visualize/mermaid.go, andvisualize/visualize.go. visualize.RenderImage(...)→visualize.BuildPlan(...)+graphviz.NewRenderer(...).Render(...)ormermaid.Source(plan).mermaid.Source(plan, opts)→ build with desiredvisualize.BuildOptions, thenmermaid.Source(plan).mermaid.SourceWithOptions(plan, opts)unconditionally usesopts.BuildOptions(including disabling flags already enabled onplan.Build).graphviz.NewRendererrequires an explicitFormat(svg,png, ordot).
Added
visualize.BuildPlan,visualize.Plan,StructureBuildOptions(), andFullBuildOptions().mermaidpackage:Source,SourceWithOptions,NewRenderer.graphvizpackage:NewRenderer,Options,Formatconstants.- Mermaid HTML label escaping fix (no literal
\:/\_in browser output). - Browser-friendly Mermaid init config (
htmlLabels: true,flowchart.useMaxWidth: false). - Edge label escaping and regression tests.
Changed
- CLI dispatches to
mermaid/graphvizrenderers based on--type. - README embedder guidance and golden Mermaid example reference.
Migration
plan, err := visualize.BuildPlan(rowType, stats, opts.BuildOptions())
renderer := graphviz.NewRenderer(graphviz.Options{Format: graphviz.SVG})
err = renderer.Render(ctx, w, plan)
plan, err := visualize.BuildPlan(rowType, stats, visualize.StructureBuildOptions())
src, err := mermaid.Source(plan)Validation
go test ./...
v0.8.0
v0.8.0
Stable release following v0.8.0-alpha.1. This release completes the migration to github.com/apstndb/spannerplan and removes deprecated shims.
Retracted
v0.7.1— incorrect patch semver for breaking changes; retracted ingo.modand the GitHub release/tag were removed.
Breaking
- Removed duplicated packages that now live in
github.com/apstndb/spannerplan:queryplan,plantree,stats, andprotoyaml(#40). - Removed
cmd/lintplan; usegithub.com/apstndb/spannerplan/cmd/lintplaninstead (#40). - Removed
cmd/rendertree; usegithub.com/apstndb/spannerplan/cmd/rendertreeinstead (#40, #50). spannerplanvizCLI now usesspannerplan.ExtractQueryPlaninstead of the removed localqueryplanpackage (#40, #41).- Plan stats and scalar child link rendering now delegate to
spannerplan(#49). - Library callers should use
option.Options.Normalize()beforevisualize.RenderImage; emptyTypeFlagdefaults tosvg(#50).
Added
- Mermaid.js diagram output via
--type=mermaid(#42). - Strict Mermaid label escaping and structured Mermaid init configuration (#43, #44).
- CLI error-path tests and
option.Normalize()validation (#50). - README stability policy (#50).
Changed
- Upgraded
github.com/apstndb/spannerplantov0.1.11(#41, #48, #49). - Pinned golangci-lint to v2.12.2 (#50).
- Improved CLI partial-output cleanup on render failure, including Windows-safe file close (#50).
Removed
Dependencies
github.com/apstndb/spannerplanv0.1.11
Validation
go test ./...
Full Changelog: v0.7.0...v0.8.0
v0.8.0-alpha.1
v0.8.0-alpha.1
Pre-release for v0.8.0 after v0.7.0.
This alpha includes the breaking refactor to depend on github.com/apstndb/spannerplan, Mermaid.js output, and removal of the deprecated github.com/apstndb/lox dependency. The mistakenly tagged v0.7.1 patch release has been retracted and removed.
Retracted
v0.7.1— incorrect patch semver for breaking changes; retracted ingo.modand the GitHub release/tag were removed.
Breaking
- Removed duplicated packages that now live in
github.com/apstndb/spannerplan:queryplan,plantree,stats, andprotoyaml(#40). - Removed
cmd/lintplan; usegithub.com/apstndb/spannerplan/cmd/lintplaninstead (#40). cmd/rendertreeis now a thin wrapper aroundgithub.com/apstndb/spannerplan/cmd/rendertree/impl(#40).spannerplanvizCLI now usesspannerplan.ExtractQueryPlaninstead of the removed localqueryplanpackage (#40, #41).
Added
- Added Mermaid.js diagram output via
--type=mermaid(#42). - Added strict Mermaid label escaping and structured Mermaid init configuration (#43, #44).
- Added regression coverage for Mermaid rendering and refactored visualization tests (#41, #42).
Changed
- Extracted plan parsing, tree rendering, stats, and protoyaml helpers into
github.com/apstndb/spannerplan(#40). - Modernized
visualizepackage internals and bumpedgo-graphviz(#41). - Upgraded
github.com/apstndb/spannerplanfromv0.1.3tov0.1.11(#41, #48). - Removed direct dependencies on
treeprint,tablewriter, and other packages now pulled in transitively throughspannerplan(#40).
Removed
- Removed
github.com/apstndb/lox(#48).
Dependencies
github.com/apstndb/spannerplanv0.1.11
Validation
go test ./...
Full Changelog: v0.7.0...v0.8.0-alpha.1