Skip to content

Releases

v0.11.0

Choose a tag to compare

@apstndb apstndb released this 22 Jul 05:36
v0.11.0
e6b29ea

Highlights

  • Migrated to github.com/apstndb/spannerplan v0.3.0 and 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/image to v0.43.0, fixing six reachable image-decoder vulnerabilities reported by govulncheck.

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, and govulncheck ./... passed.

v0.10.2

Choose a tag to compare

@apstndb apstndb released this 08 Jul 09:32
c7908a0

v0.10.2

D2 label typography fix. Only the D2 backend's output changes; Mermaid/DOT/SVG outputs are untouched.

Fixed

  • d2 package (#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

Choose a tag to compare

@apstndb apstndb released this 08 Jul 07:15
76d9c87

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

  • d2 package (#60): Source, SourceWithOptions, NewRenderer emit D2 source text — markdown labels (bold title, italic stats), native tooltip attributes carrying the canonical plan YAML, style.stroke-dash for 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 via Options.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

Choose a tag to compare

@apstndb apstndb released this 08 Jul 05:22
c4dba53

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 dot now emits pure, unlaid-out DOT source generated by the dot package (no pos/bb/layout attributes), instead of Graphviz's layout-annotated -Tdot output. 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 graphviz package (svg/png) now renders by parsing the dot package'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.DOT remains available for runtime -Tdot rendering via graphviz.NewRenderer if the old behavior is needed programmatically.

v0.9.3

Choose a tag to compare

@apstndb apstndb released this 08 Jul 03:31
dfbad53

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/tooltip attributes and DOT tooltip attributes) switch from a reflection-based YAML dump to the canonical protojson-over-YAML rendering via github.com/apstndb/protoyaml v0.1.0 (#55): camelCase proto field names (displayName, childLinks, executionStats), named enums (kind: RELATIONAL), and protojson field-number ordering. Keys inside metadata/executionStats are plan data and are unchanged. Diffs are confined to tooltip text; goldens regenerated accordingly.

Dependencies

  • Dropped sigs.k8s.io/yaml (direct) and, transitively, the archived gopkg.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

Choose a tag to compare

@apstndb apstndb released this 07 Jul 20:35
7c7e77b

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/spannerplan from 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

Choose a tag to compare

@apstndb apstndb released this 07 Jul 18:44
56d576d

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

  • dot package: Source, SourceWithOptions, NewRenderer, Options. Emits DOT source describing the same graph as the graphviz package (same nodes, edges, attributes, and traversal order) while depending only on visualize — no goccy/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.dot golden.

Fixed

  • graphviz package: the query-text edge (--show-query / --show-query-stats) no longer renders a stray node0->query text 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 dot still renders through the Graphviz runtime for byte-stable output.

v0.9.0

Choose a tag to compare

@apstndb apstndb released this 30 Jun 14:27
c42919e

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, and visualize/visualize.go.
  • visualize.RenderImage(...) → visualize.BuildPlan(...) + graphviz.NewRenderer(...).Render(...) or mermaid.Source(plan).
  • mermaid.Source(plan, opts) → build with desired visualize.BuildOptions, then mermaid.Source(plan).
  • mermaid.SourceWithOptions(plan, opts) unconditionally uses opts.BuildOptions (including disabling flags already enabled on plan.Build).
  • graphviz.NewRenderer requires an explicit Format (svg, png, or dot).

Added

  • visualize.BuildPlan, visualize.Plan, StructureBuildOptions(), and FullBuildOptions().
  • mermaid package: Source, SourceWithOptions, NewRenderer.
  • graphviz package: NewRenderer, Options, Format constants.
  • 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 / graphviz renderers 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

Choose a tag to compare

@apstndb apstndb released this 30 Jun 04:19
ea028e1

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 in go.mod and the GitHub release/tag were removed.

Breaking

  • Removed duplicated packages that now live in github.com/apstndb/spannerplan: queryplan, plantree, stats, and protoyaml (#40).
  • Removed cmd/lintplan; use github.com/apstndb/spannerplan/cmd/lintplan instead (#40).
  • Removed cmd/rendertree; use github.com/apstndb/spannerplan/cmd/rendertree instead (#40, #50).
  • spannerplanviz CLI now uses spannerplan.ExtractQueryPlan instead of the removed local queryplan package (#40, #41).
  • Plan stats and scalar child link rendering now delegate to spannerplan (#49).
  • Library callers should use option.Options.Normalize() before visualize.RenderImage; empty TypeFlag defaults to svg (#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/spannerplan to v0.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

  • Removed github.com/apstndb/lox (#48).
  • Removed deprecated cmd/rendertree shim (#50).

Dependencies

  • github.com/apstndb/spannerplan v0.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
Pre-release

Choose a tag to compare

@apstndb apstndb released this 30 Jun 00:28
77d96f0

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 in go.mod and the GitHub release/tag were removed.

Breaking

  • Removed duplicated packages that now live in github.com/apstndb/spannerplan: queryplan, plantree, stats, and protoyaml (#40).
  • Removed cmd/lintplan; use github.com/apstndb/spannerplan/cmd/lintplan instead (#40).
  • cmd/rendertree is now a thin wrapper around github.com/apstndb/spannerplan/cmd/rendertree/impl (#40).
  • spannerplanviz CLI now uses spannerplan.ExtractQueryPlan instead of the removed local queryplan package (#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 visualize package internals and bumped go-graphviz (#41).
  • Upgraded github.com/apstndb/spannerplan from v0.1.3 to v0.1.11 (#41, #48).
  • Removed direct dependencies on treeprint, tablewriter, and other packages now pulled in transitively through spannerplan (#40).

Removed

  • Removed github.com/apstndb/lox (#48).

Dependencies

  • github.com/apstndb/spannerplan v0.1.11

Validation

  • go test ./...

Full Changelog: v0.7.0...v0.8.0-alpha.1