Skip to content
lumosql-nf Home
Login

Home

lumosql-nf

LumoSQL maintains its changes to SQLite as a recipe of rules, applied by Not-forking to each upstream release. This repository keeps that recipe and its results in ordinary Fossil branches, to test one idea: merge a fork against the ruled upstream, never against raw upstream.

A three-way merge carries edits already made. A rule also applies to upstream text written later. When the merge's base and incoming side both already have the rules applied, the merge only has to carry the hand edits no rule explains.

Branches

Branch What it holds
trunk LumoSQL's not-fork.d/sqlite3 recipe (MIT, see LICENCE-LumoSQL-MIT.txt)
vendor SQLite releases as published, one check-in each, tagged sqlite-X.Y.Z
vendor-ruled The same releases with the recipe applied by not-fork 0.8, tagged ruled-X.Y.Z, nf-upstream (the vendor check-in) and nf-recipe (the trunk check-in)
fork Starts at ruled 3.43.0 plus two demo hand edits; each later release is merged in from vendor-ruled
fork-plain The control: the same start, with each release merged in from vendor, the classic vendor-branch way

The hand edits are labelled demo edits in src/sqliteInt.h, src/main.c and README.md. They are not LumoSQL's.

Results

Every merge was compared, file by file, with the correct tree for that release: the ruled release plus the hand edits. Each merge check-in's comment records what was found. Both branches end identical to the correct 3.53.4 fork.

Release fork (from vendor-ruled) fork-plain (from vendor)
3.45.0 clean clean
3.50.0 1 conflict: README.md, at the demo hand edit 6 conflicts (Makefile.in, README.md, main.mk, src/func.c, src/vdbe.c, tool/mksqlite3h.tcl); src/pager.c silently wrong
3.51.0 clean 1 conflict: src/pragma.c
3.53.2 clean clean
3.53.4 clean clean

The silent error is the one that matters. SQLite 3.50.0 added a comment naming wal.c at src/pager.c:1850. LumoSQL's rename rule rewrites it to lumo_wal.c, but the classic merge has no edit to carry there, so the file merges cleanly and comes out wrong. On the fork branch the rule had already run, so there was nothing to get wrong.

Limits

Credits

The recipe and the Not-forking tool are by Dan Shearer and the LumoSQL authors. SQLite is in the public domain.