Context
The eio branch carries 157 commits converting Irmin from Lwt to Eio (direct-style with effects). The goal is to retire main (Irmin 3.x / Lwt) and promote eio as the new main (Irmin 4.0.0). This issue documents the gap and the risks involved.
Scale of the gap
| Metric |
Value |
Commits on eio not in main |
157 |
Commits on main not in eio |
6 (all already cherry-picked via #2385) |
| Files changed |
401 |
| Lines added / removed |
+13,325 / −10,141 |
| OCaml source files changed |
256 .ml + 75 .mli |
What's reassuring
main is fully synced into eio. The 6 main-only commits are already cherry-picked. No merge conflicts expected.
- CI is green. Last 20 runs all pass (Ubuntu + macOS).
- The work is substantial and coherent. 7+ contributors, led by @art-w (76 commits). Well-structured migration, not a half-finished experiment.
lwt_eio bridge used where needed. irmin-git, irmin-graphql, irmin-mirage, irmin-client, irmin-server all use the bridge layer.
Risks
1. Pending PRs on eio (7 open)
| PR |
Risk |
Notes |
| #2397 Multicore safety (mutexes/atomics) |
Low |
CI failure is formatting only (dune fmt), not a build or test issue. Builds and tests pass. 202+/146− across 19 files. See investigation. |
| #2400 Inline small contents |
Medium |
Large (3068+/312−, 101 files). CI green. Depends on #2378 / #2390 also open. |
| #2336 Integrate eio watcher |
Low |
Integration work |
| #2379 Energy benchmarks |
Low |
Benchmarks only |
| #2368 Lavyek backend (WIP) |
Low |
Experimental |
Note: the eio branch itself has pre-existing lint-fmt issues (8 files) because the GitHub Actions CI (dune.yml) doesn't run dune fmt — only ocaml-ci does, and it only triggers on PRs. A dune fmt commit on eio is needed regardless of #2397.
2. Orphaned PRs on main (14 open)
3. Pinned dependencies
4 pins point to specific commits on forks, not released opam packages:
| Package |
Source |
Bus-factor risk |
| irmin-watcher |
patricoferris/irmin-watcher |
Single maintainer |
| bisect_ppx |
patricoferris/bisect_ppx |
Single maintainer |
| index |
mirage/index |
Official org |
| qcheck-stm |
lyrm/multicoretests |
Less established |
All commits verified to exist. But users cannot opam install irmin from the standard repository until these are upstreamed or released.
4. No migration guide
No documentation for downstream consumers explaining how to port from Irmin 3.x (Lwt) to 4.0.0 (Eio). OCaml 5.1.0+ is now a hard requirement.
Suggested plan
Before the switch
The switch
Safest mechanical approach:
- Rename
main → main-v3 (or lwt-legacy)
- Rename
eio → main
- Update GitHub default branch
- Retarget any surviving PRs
This avoids a giant merge commit and preserves full history on both branches.
After the switch
Bottom line
The gap is large but well-managed. The merge mechanics are safe (eio already contains main). The pending PRs are in better shape than initially assessed — #2397's CI failure is just formatting, not a correctness issue. The remaining risks are the pinned dependencies blocking a clean opam release and the downstream impact on consumers who haven't migrated yet.
Context
The
eiobranch carries 157 commits converting Irmin from Lwt to Eio (direct-style with effects). The goal is to retiremain(Irmin 3.x / Lwt) and promoteeioas the newmain(Irmin 4.0.0). This issue documents the gap and the risks involved.Scale of the gap
eionot inmainmainnot ineio.ml+ 75.mliWhat's reassuring
mainis fully synced intoeio. The 6 main-only commits are already cherry-picked. No merge conflicts expected.lwt_eiobridge used where needed. irmin-git, irmin-graphql, irmin-mirage, irmin-client, irmin-server all use the bridge layer.Risks
1. Pending PRs on
eio(7 open)dune fmt), not a build or test issue. Builds and tests pass. 202+/146− across 19 files. See investigation.Note: the
eiobranch itself has pre-existinglint-fmtissues (8 files) because the GitHub Actions CI (dune.yml) doesn't rundune fmt— only ocaml-ci does, and it only triggers on PRs. Adune fmtcommit oneiois needed regardless of #2397.2. Orphaned PRs on
main(14 open)Tree.is_valandTree.Contents.is_valfunctions #1864, irmin-tezos: simplify the way we serialise nodes #2014, irmin-pack: replace inode's Map by a list of pairs #2042, Add fsync for directory #2132, WIP: irmin-pack.unix: Measure IO activity. #2250) are 2.8–4 years old — candidates for closing. Add fsync for directory #2132 had activity 1 week ago, so someone may care.Store.last-modifiedby comparing hashes instead of file contents #2335 (speed up last-modified) and irmin_git:fetch_allfor fetching all refs of a remote repo #2345 (fetch_all) touch code heavily changed by eio — would need complete rebasing.3. Pinned dependencies
4 pins point to specific commits on forks, not released opam packages:
All commits verified to exist. But users cannot
opam install irminfrom the standard repository until these are upstreamed or released.4. No migration guide
No documentation for downstream consumers explaining how to port from Irmin 3.x (Lwt) to 4.0.0 (Eio). OCaml 5.1.0+ is now a hard requirement.
Suggested plan
Before the switch
dune fmton theeiobranch to fix 8 pre-existing formatting issues.dune fmtpass (builds and tests already pass).Tree.is_valandTree.Contents.is_valfunctions #1864, irmin-pack: replace inode's Map by a list of pairs #2042, WIP: irmin-pack.unix: Measure IO activity. #2250). Notify authors of Add fsync for directory #2132, Speed upStore.last-modifiedby comparing hashes instead of file contents #2335, irmin_git:fetch_allfor fetching all refs of a remote repo #2345 that main is about to change.The switch
Safest mechanical approach:
main→main-v3(orlwt-legacy)eio→mainThis avoids a giant merge commit and preserves full history on both branches.
After the switch
4.0.0~betaor similar pre-release so downstream consumers can test.Bottom line
The gap is large but well-managed. The merge mechanics are safe (eio already contains main). The pending PRs are in better shape than initially assessed — #2397's CI failure is just formatting, not a correctness issue. The remaining risks are the pinned dependencies blocking a clean opam release and the downstream impact on consumers who haven't migrated yet.