Skip to content

demo_ref: pass a Deriving_Json codec to the persistent eref - #5

Draft
balat wants to merge 2 commits into
modernizefrom
deriving
Draft

demo_ref: pass a Deriving_Json codec to the persistent eref#5
balat wants to merge 2 commits into
modernizefrom
deriving

Conversation

@balat

@balat balat commented May 29, 2026

Copy link
Copy Markdown
Member

Summary

Companion to ocsigen/eliom#859 / ocsigen/ocsigen-start#703.
Eliom 13 requires every `Reference.eref ~persistent` to carry a
`Deriving_Json.t` codec. Use
`[%json: Os.Date.local_calendar option]`, which resolves to the
codec exposed by `Os.Date`.

Test plan

  • `demo_ref.cmx` is produced by `dune build` against
    `eliom#deriving` + `ocsigen-start#deriving`

@balat
balat changed the base branch from master to modernize July 17, 2026 14:24
balat added 2 commits July 17, 2026 16:35
Eliom 13 requires every Reference.eref ~persistent to carry a
Deriving_Json codec. Use [%json: Os.Date.local_calendar option],
which resolves to the codec exposed by Os.Date.
The generator reads the build directory (".."), which mirrors the sources
but also contains generated files: the .pp.eliom/.pp.eliomi preprocessing
artifacts and the .eliom modules produced from assets/*.tsv (i18n) and
*.eliom.in (static config). Enumerating those emitted a client rule twice
for the same target, so `make all` failed with "Multiple rules generated
for ...". Filter them out and keep only real sources.

Completes the sandbox fix: the previous commit corrected the paths but
exposed these duplicates once the generator started reading the build tree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant