Skip to content

Risk assessment: promoting eio branch to main #2401

@cuihtlauac

Description

@cuihtlauac

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

  1. main is fully synced into eio. The 6 main-only commits are already cherry-picked. No merge conflicts expected.
  2. CI is green. Last 20 runs all pass (Ubuntu + macOS).
  3. The work is substantial and coherent. 7+ contributors, led by @art-w (76 commits). Well-structured migration, not a half-finished experiment.
  4. 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 mainmain-v3 (or lwt-legacy)
  • Rename eiomain
  • Update GitHub default branch
  • Retarget any surviving PRs

This avoids a giant merge commit and preserves full history on both branches.

After the switch

  • Unpin dependencies as upstream releases land. Track which pins are blocking an opam release.
  • Write a CHANGES.md entry documenting the breaking changes and migration path.
  • Tag a 4.0.0~beta or 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions