Skip to content
lumosql-nf Update of ”Home”
Login

Update of ”Home”

Overview

Artifact ID: 56a83de026a6b0d1a9fc5d5251fc58393c48823922b1f277c778ce034f605b75
Page Name:Home
Date: 2026-12-02 21:54:16
Original User: dmestas
Mimetype:text/x-markdown
Content

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 output 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 its incoming side both already have the rules applied, the merge only has to carry the hand edits no rule explains. Not-forking stays the engine that does the work; Fossil stores the result and merges against it.

Branches

Branch What it holds
trunk LumoSQL's not-fork.d/sqlite3 recipe (MIT, see LICENCE-LumoSQL-MIT.txt), the scripts in tools/ and their output in results/
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, fork-plain Ruled 3.43.0 plus three demo hand edits. fork merges each later release from vendor-ruled; fork-plain merges it from vendor, the classic vendor-branch way
fork-adv, fork-adv-plain The same pair with three hand edits placed next to lines the recipe changes: beside a renamed comment in src/pager.c, inside a block vdbe-changes.mod adds to src/vdbe.c, and in the source list in main.mk that the rename rules rewrite

The hand edits are labelled as demo edits. 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. The merge check-in's comment records what was found, and the branch was then set to the correct tree.

Release fork fork-plain fork-adv fork-adv-plain
3.45.0 clean clean clean clean
3.50.0 1 conflict (README.md, at a hand edit) 6 conflicts, src/pager.c silently wrong clean 5 conflicts, src/pager.c silently wrong
3.51.0 clean 1 conflict (src/pragma.c) clean 1 conflict (src/pragma.c)
3.53.2 clean clean clean clean
3.53.4 clean clean clean clean

The classic-merge conflicts map onto the recipe. Makefile.in and main.mk come from the switch at 3.48 between makefile.mod and makefile-autosetup.mod. src/func.c, src/vdbe.c and src/pragma.c are fragment_patch changes. tool/mksqlite3h.tcl is a sed rule.

The silent error is the one that matters. SQLite 3.50.0 added a comment naming wal.c at src/pager.c:1850, which backend-rename.mod:109 rewrites to lumo_wal.c. The classic merge has no edit to carry there, so the file merges cleanly and comes out wrong.

The adversarial edits caused no conflicts. A hand edit beside a rule-touched line conflicts only when upstream changes that same spot, as with any three-way merge.

Tests

All of these are in tools/, and their output is in results/.

Findings for the recipe

Limits

Rebuilding

SQLITE_REPO=sqlite.fossil LUMOSQL=lumosql tools/build.sh base lumosql-nf.fossil
tools/build.sh fork lumosql-nf.fossil fork demo
tools/build.sh fork lumosql-nf.fossil fork-adv adversarial
SQLITE_REPO=sqlite.fossil tools/verify.sh lumosql-nf.fossil

Credits

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