Skip to content

Bump Lightweight to 17c4e70d and retire the workarounds it made obsolete - #873

Merged
Yaraslaut merged 4 commits into
masterfrom
examples/bump-lightweight
Oct 5, 2026
Merged

Yaraslaut merged 4 commits into
masterfrom
examples/bump-lightweight

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

Moves the examples from Lightweight bbb972a7 to 17c4e70d, which is 239 commits newer. Two limitations the examples worked around are fixed upstream at this revision:

  • Where() can bind a binary value (Lightweight#618).
  • DataMapperPool::Return rolls back a transaction left open on a returned connection (Lightweight#583).

The remaining limitations are now filed upstream instead of being recorded in this repository, and the two docs that held that kind of record go.

Changes

  • Pin moves to 17c4e70d in examples/common and examples/bank. The ODBC include note in cmake/morph_demote_interface_includes.cmake still holds at the new revision and now names it.
  • The pool transaction audit is removed. Pool::Return now rolls back before it fires OnConnectionIdle, so the audit could never again see what it checks for. Removed with it:
    • every rung's install call,
    • the DbFixture install,
    • the audit's self-test,
    • bank's test_pool_scope, whose only purpose was to record why the audit wasn't installed there.
  • bank adapts to the new relation API. HasMany::All() / Count() now return RelationResult (std::expected). db::requireLoaded turns an unloaded relation into a BankError, and test_relations checks the expected explicitly.
  • Exit-time abort workaround (Lightweight#649). MigrationManager now keeps a DataMapper open in a static, and that static is destroyed after Lightweight's default logger. So every process that applied migrations aborted at exit with pure virtual method called; before the workaround, 734 of 2960 ctest cases failed this way. Each migration site now calls CloseDataMapper() once migrations are applied.
  • DbFixture: a dangling foreign key no longer needs reporting. At this revision ReadAllTables reads such a schema instead of throwing map::at, so the fixture just clears it. The testkit case now checks that the dangling table is gone and the database accepts a write. The report path stays for any other failure to read the schema.
  • Docs:
    • docs/LIGHTWEIGHT-CONSTRAINTS.md is deleted; examples/IMPLEMENTATION.md now sends readers to Lightweight's issue tracker.
    • docs/todo.md, which tracked two programs that have both shipped, is deleted.
    • Its "Considered and refused" table is a current decision, so it moves into docs/ARCHITECTURE.md as Non-goals.
    • Every reference to either file is updated.

Filed upstream:

  • Lightweight#647: partial indexes in the migration DSL.
  • Lightweight#648: configurable SQLite busy_timeout / journal_mode.
  • Lightweight#649: the exit-time abort.

Query<Record>().Update() was not filed: dm.Update(entity) is the intended API.

🤖 Generated with Claude Code

https://claude.ai/code/session_0141t3QdB4FkiHqiCX2M2eF2

Yaraslaut and others added 3 commits October 4, 2026 22:14
… blind

Lightweight 17c4e70d binds binary values in Where() and rolls back a
transaction left open on a pooled connection before handing it on. The
second makes PoolTransactionAudit unable to see what it checks for --
Pool::Return now rolls back before it fires OnConnectionIdle -- so the
audit, its self-test, bank's record of why it was not installed there, and
every rung's install call go.

Two adaptations the new revision needs:
- HasMany accessors return RelationResult (std::expected); bank unwraps
  them through db::requireLoaded, which turns an unloaded relation into
  a BankError.
- MigrationManager now keeps a DataMapper open in a static, which is
  destroyed after Lightweight's default logger and aborts every process
  that applied migrations ("pure virtual method called" at exit). Each
  migration site closes it once migrations are applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141t3QdB4FkiHqiCX2M2eF2
…cker

docs/LIGHTWEIGHT-CONSTRAINTS.md recorded limits of a pinned revision; the
ones still open are now filed upstream, which is where examples/IMPLEMENTATION.md
sends a reader instead. docs/todo.md tracked two programs that have both
shipped. Its "Considered and refused" table is a current decision, not
history, so it moves into docs/ARCHITECTURE.md as Non-goals; every
reference to either file is updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141t3QdB4FkiHqiCX2M2eF2
…st the clear, not the report

At 17c4e70d SqlSchema::ReadAllTables reads a schema holding a foreign key
to a missing table instead of throwing map::at out of it, so DbFixture
simply drops the dangling table. The two testkit cases that expected the
fixture's report for that state could no longer reach it: the wording
case goes, and the usability case now checks that the dangling table is
gone and the database takes a write. The report path stays as the guard
for any other failure to read the schema, with its text no longer naming
map::at as the cause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141t3QdB4FkiHqiCX2M2eF2
@Yaraslaut Yaraslaut added documentation Improvements or additions to documentation area: ladder Subsystem: ladder labels Oct 4, 2026
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

@Yaraslaut
Yaraslaut merged commit c33b7c9 into master Oct 5, 2026
61 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ladder Subsystem: ladder documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant