Repository navigation
go-graphviz v0.5.0 - #56
Conversation
closer-claudio
left a comment
There was a problem hiding this comment.
🛑 at 8382fb6, for two reasons. The module bump itself is right; what rides with it is not.
🛑 -Tdot now emits xdot. The body says none of the renamed API, FontLoader or XDOT is referenced. cmd/dot/main.go:85 maps "dot" to graphviz.XDOT, and so does the default at main.go:100. In v0.5.0, XDOT is "xdot" (go-graphviz#78, under Breaking in the 0.5.0 changelog); plain DOT is graphviz.GV. Built from this head, printf 'digraph{a->b}' | dot -Tdot writes four _draw_ lines: the default output of the tool changed from DOT to xdot, and dot -Txdot says unknown format. The tests pass because TestFormats checks only that the output starts with digraph, which xdot does too; I flagged exactly this on go-graphviz#78, and Fluffy's note there said the dot bump would assert on _draw_. Fix: "dot" → graphviz.GV at both sites, add "xdot" → graphviz.XDOT (and the usage line), and have the format test require no _draw_ for -Tdot and _draw_ for -Txdot. -Txdot is then an Added entry for 1.2.0.
🛑 A 12 MB binary is committed. The diff adds dot at the repository root: mode 100755, 12,309,106 bytes, a Mach-O arm64 executable (Bin 0 -> 12309106), the go build output of this checkout. It is not on main, and .gitignore does not list it. Remove it from the commit, and add /dot to .gitignore so the next build can't be committed by accident.
🔍 The bump itself:
- Both
go.sumlines for go-graphviz v0.5.0 match sum.golang.org;ggandfreetypeleave with it, as #81 removed them.go mod tidy -diffis clean; build, vet and the tests pass. - The 1.2.0 section's claims trace to the 0.5.0 changelog: 320 MB → 7 MB and 30 → 13 ms for the 40-node PNG ("half the time"), WebP with alpha, absolute image paths, a setter's error failing the render. The date moves to 2026-10-08.
- One commit, signed, on the current main.
The engine moves to forkcloser/go-graphviz v0.5.0, which drops fogleman/gg and golang/freetype from the module graph, draws PNG and JPEG the way Graphviz's Cairo renderer does, and fixes node images named by an absolute path and WebP images with alpha. v0.5.0 also names the two DOT outputs apart: graphviz.XDOT is now xdot, the layout with its drawing operations, and plain DOT with positions is graphviz.GV. -Tdot keeps emitting the latter, so it maps to GV, and -Txdot is new. The render test asserts _draw_ in xdot and not in dot; it used to check the "digraph" prefix only. The 1.2.0 section names the engine version and what its users see, and its link follows the tag. A built binary at the repository root is ignored. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: closer-claudio <claudio@farcloser.world>
8382fb6 to
f9e7445
Compare
closer-claudio
left a comment
There was a problem hiding this comment.
✅ at f9e7445: both 🛑 are closed.
🔍 Checked on a dot built from this head:
"dot"maps tographviz.GV(and is the default),"xdot"tographviz.XDOT, with the usage line and the package doc naming both.printf 'digraph{a->b}' | dot -Tdothas 3pos=lines and 0_draw_;-Txdothas 4_draw_.TestRenderFormatsrequirespos=in both forms and_draw_in xdot alone, so the prefix-only check that let the regression through is gone.- No
dotfile is tracked, and.gitignoregains/dotwith a comment saying why. - The CHANGELOG adds
-Txdotunder Added, keeps-Tdotas positions only, and the body no longer claimsXDOTwas unreferenced. - One squashed commit, signed, on the current main;
go.mod/go.sumunchanged from my first pass, hashes matching sum.golang.org.
📝 Renovate's #57 is now redundant and, without this code change, wrong; it's @apostasie's to close once this lands.
🎯 Why
go-graphviz v0.5.0 is tagged; dot's 1.2.0 release ships on it.
🛠️ What
go.mod/go.sum:github.com/forkcloser/go-graphvizv0.4.0 → v0.5.0;fogleman/ggandgolang/freetypeleave the module graph with it.graphviz.XDOTis xdot now (layout plus drawing operations) and plain DOT with positions isgraphviz.GV.-Tdotkeeps its output by mapping toGV;-Txdotis new. Usage and package doc list it.cmd/dot/main_test.go:TestRenderFormatsassertspos=in both DOT forms and_draw_in xdot only (it checked thedigraphprefix only, which is why the first push of this PR passed with-Tdotemitting xdot).CHANGELOG.md1.2.0 section: engine v0.5.0, date 2026-10-08, link to the v0.5.0 changelog,-Txdotunder Added, and what its users see from 0.5.0 under Changed and Fixed..gitignore:/dot, the binarygo buildleaves at the root.🧪 How
just lint(all but links, sandbox) andjust testgreen. Built binary:-Tdothas 0_draw_lines,-Txdothas 4.