Skip to content

geom: split geom.go by concern - #97

Merged
timzifer merged 1 commit into
mainfrom
refactor/split-geom-go
Nov 20, 2026
Merged

timzifer merged 1 commit into
mainfrom
refactor/split-geom-go

Conversation

@timzifer

Copy link
Copy Markdown
Owner

Refs #86 (step 2 of 4, ADR 0095 §5).

geom/geom.go (2,254 lines) → six files:

File Lines Holds
geom.go 197 package doc, Geom, Frame, Training, Missing, legend types, placer interfaces
options.go 972 Option and its constructors, the option enums
config.go 399 config, newConfig and its methods
series.go 430 series, resolve, column readers, nulls and missing values
batch.go 177 colour/index/rect runs, colour and size training
slots.go 111 extents, gaps, slots, baselines

Pure move: a script cut at declaration boundaries (doc comments travel with their declaration) and asserted every original line lands in exactly one file; go doc -all ./geom is byte-identical before and after; only per-file import blocks are new. Tests green locally (geom, spec, render, interact, a11y, root).

https://claude.ai/code/session_015BfhXWEPyCFY4fZhg5nzsh

geom.go was 2,254 lines holding the core types, every option, the
configuration they write, the column readers, the batching runs and the
slot arithmetic. It is now six files: geom.go (the package doc, Geom,
Frame, Training and the other core types), options.go (Option and its
constructors), config.go (config and its methods), series.go (series,
the column readers and missing values), batch.go (colour, index and rect
runs) and slots.go (extents, gaps, slots and baselines).

A move and nothing else: every declaration is unchanged and keeps its
doc comment, `go doc -all ./geom` is byte-identical before and after,
and only import blocks were added per file.

Refs #86

Claude-Session: https://claude.ai/code/session_015BfhXWEPyCFY4fZhg5nzsh
@timzifer
timzifer merged commit 5067192 into main Nov 20, 2026
18 checks passed
@timzifer
timzifer deleted the refactor/split-geom-go branch November 20, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant