Tags and Properties for Check-in faf57ad9c7
- sym-trunk inherited from [f5744359d3]
- sym-v0.6.0=Release v0.6.0 - `Repo.Close` now runs `PRAGMA wal_checkpoint(TRUNCATE)` before closing the underlying connection, so the on-disk repo file is readable by external SQLite/fossil tooling. Previously, libfossil-managed repos could be left as a 4 KiB stub plus a fat WAL sidecar that vanilla `fossil` rejected as `not a valid repository`. (#27, #28) - New public `Repo.Checkpoint(mode)` method and `CheckpointMode` enum (`Passive` / `Full` / `Restart` / `Truncate`) for explicit mid-flight checkpointing. Long-running consumers (hubs, daemons) no longer need to reach through `Repo.DB().Exec("PRAGMA wal_checkpoint(...)")`. None. The Close error type may now be a joined error (`errors.Join(checkpointErr, closeErr)`) when both checkpoint and close fail; callers using `errors.Is` and `errors.As` continue to work. - No code changes required to benefit from the close-time checkpoint fix. - Callers running raw `PRAGMA wal_checkpoint` against `Repo.DB()` can switch to `Repo.Checkpoint(libfossil.CheckpointTruncate)` (or other modes) for a typed API surface. 9013d33 fix: checkpoint WAL on Close so vanilla fossil can read repo (#28) added by [13ecfea3cf] on 2026-05-05 15:15:56
|
2026-05-05
| ||
| 15:15 |
•
Edit [faf57ad9c7]: Add tag "v0.6.0" with note "Release v0.6.0
- `Repo.Close` now runs `PRAGMA wal_checkpoint(TRUNCATE)` before closing the underlying connection, so the on-disk repo file is readable by external SQLite/fossil tooling. Previously, libfossil-managed repos could be left as a 4 KiB stub plus a fat WAL sidecar that vanilla `fossil` rejected as `not a valid repository`. (#27, #28) - New public `Repo.Checkpoint(mode)` method and `CheckpointMode` enum (`Passive` / `Full` / `Restart` / `Truncate`) for explicit mid-flight checkpointing. Long-running consumers (hubs, daemons) no longer need to reach through `Repo.DB().Exec("PRAGMA wal_checkpoint(...)")`. None. The Close error type may now be a joined error (`errors.Join(checkpointErr, closeErr)`) when both checkpoint and close fail; callers using `errors.Is` and `errors.As` continue to work. - No code changes required to benefit from the close-time checkpoint fix. - Callers running raw `PRAGMA wal_checkpoint` against `Repo.DB()` can switch to `Repo.Checkpoint(libfossil.CheckpointTruncate)` (or other modes) for a typed API surface. 9013d33 fix: checkpoint WAL on Close so vanilla fossil can read repo (#28)". artifact: 13ecfea3cf user: [email protected] | |
| 15:11 |
fix: checkpoint WAL on Close so vanilla fossil can read repo (#28)
Closes #27. libfossil opens repos in WAL journal mode but the Close chain never ran wal_checkpoint, so closed repo files were a 4 KiB stub plus a fat -wal sidecar. Vanilla fossil's validity probe stats the main file before consulting the WAL → repo rejected as "not a valid repository". - Adds a typed CheckpointMode (Passive / Full / Restart / Truncate) and a Checkpoint(mode) method on the public Repo (mirrored through internal repo and db.DB). CheckpointMode and its constants are re-exported from the package root so callers don't have to import db. - db.DB.Close now runs PRAGMA wal_checkpoint(TRUNCATE) before closing the underlying *sql.DB. Checkpoint errors are joined with the close error via errors.Join so the connection is always closed regardless of checkpoint outcome. - Skips the close-time checkpoint on the WASM/WASI build path where WAL isn't used. check-in: faf57ad9c7 user: [email protected] tags: trunk, v0.6.0 | |
|
2026-04-19
| ||
| 16:30 |
Initial open source release
libfossil is a pure-Go implementation of the Fossil SCM, reading and writing the same .fossil SQLite repository format as upstream Fossil. This is the first public release of code that previously lived in a private repository. The module path is github.com/danmestas/libfossil and the binary is named libfossil to avoid $PATH collisions with upstream fossil. Included: - Repo lifecycle (create, clone), checkout/checkin, timeline, merge, diff, annotate, shun, tag, branch, bisect, stash, undo/redo - Sync-over-HTTP protocol (client and handler) - Two SQLite drivers: modernc (pure Go, default) and ncruces (wasm-capable) - Observer interfaces (SyncObserver, CheckoutObserver) with an optional OpenTelemetry implementation in observer/otel (separate submodule) - Deterministic simulation testing harness with BUGGIFY fault injection - Kong-based embeddable CLI under cli/ and a standalone binary under cmd/libfossil/ check-in: f5744359d3 user: [email protected] tags: trunk | |