Organisationsahrefsatd9b2abd ()debian-13-4.14_riscv64_opam-2.4

debian-13-4.14_riscv64_opam-2.4

Link Copied
Code Copied

Logs

2025-12-09 19:39.05: New job: test ahrefs/atd https://github.com/ahrefs/atd.git#refs/heads/yojson3 (9b2abd5bc58e93fd0a38a1de4f4a819e13226e7a) (linux-riscv64:debian-13-4.14_riscv64_opam-2.4)
Base: ocaml/opam:debian-13-ocaml-4.14@sha256:cda000de9eec4a5cd6ab249d75a73bfb5e392c1745c5121432c7418ad5cf8adf
Opam project build


To reproduce locally:


git clone --recursive "https://github.com/ahrefs/atd.git" -b "yojson3" && cd "atd" && git reset --hard 9b2abd5b
cat > Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:debian-13-ocaml-4.14@sha256:cda000de9eec4a5cd6ab249d75a73bfb5e392c1745c5121432c7418ad5cf8adf
# debian-13-4.14_riscv64_opam-2.4
USER 1000:1000
ENV CLICOLOR_FORCE="1"
ENV OPAMCOLOR="always"
WORKDIR /src
RUN sudo ln -f /usr/bin/opam-2.4 /usr/bin/opam
RUN opam init --reinit -ni
RUN uname -rs && opam exec -- ocaml -version && opam --version
WORKDIR /src
RUN sudo chown opam /src
RUN cd ~/opam-repository && (git cat-file -e 8a324a5b9945e0e515da441ede437f3756caa83d || git fetch origin master) && git reset -q --hard 8a324a5b9945e0e515da441ede437f3756caa83d && git log --no-decorate -n1 --oneline && opam update -u
COPY --chown=1000:1000 atdts.opam atds.opam atdpy.opam atdj.opam atdgen.opam atdgen-runtime.opam atdgen-codec-runtime.opam atdd.opam atdcpp.opam atd.opam ./
RUN opam pin add -yn atdts.dev './' && \
opam pin add -yn atds.dev './' && \
opam pin add -yn atdpy.dev './' && \
opam pin add -yn atdj.dev './' && \
opam pin add -yn atdgen.dev './' && \
opam pin add -yn atdgen-runtime.dev './' && \
opam pin add -yn atdgen-codec-runtime.dev './' && \
opam pin add -yn atdd.dev './' && \
opam pin add -yn atdcpp.dev './' && \
opam pin add -yn atd.dev './'
RUN echo '(lang dune 3.0)' > './dune-project'
ENV DEPS="alcotest.1.9.1 astring.0.8.5 base-bigarray.base base-threads.base base-unix.base biniou.1.2.2 camlp-streams.5.0.1 cmdliner.2.1.0 conf-python-3.9.0.0 dune.3.20.2 easy-format.1.3.4 fmt.0.11.0 menhir.20250912 menhirCST.20250912 menhirLib.20250912 menhirSdk.20250912 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-config.2 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocamlbuild.0.16.1 ocamlfind.1.9.8 re.1.14.0 seq.base stdlib-shims.0.3.0 topkg.1.1.1 uutf.1.0.4 yojson.2.2.2"
ENV CI="true"
ENV OCAMLCI="true"
RUN opam update --depexts && opam install --cli=2.4 --depext-only -y atdts.dev atds.dev atdpy.dev atdj.dev atdgen.dev atdgen-runtime.dev atdgen-codec-runtime.dev atdd.dev atdcpp.dev atd.dev $DEPS
RUN opam install $DEPS
COPY --chown=1000:1000 . /src
RUN opam exec -- dune build @install @check @runtest && rm -rf _build


END-OF-DOCKERFILE
docker build .
END-REPRO-BLOCK


2025-12-09 19:39.05: Using cache hint "ahrefs/atd-ocaml/opam:debian-13-ocaml-4.14@sha256:cda000de9eec4a5cd6ab249d75a73bfb5e392c1745c5121432c7418ad5cf8adf-debian-13-4.14_riscv64_opam-2.4-3defb39c8f8e1d2ad79778404c35fe0a"
2025-12-09 19:39.05: Using OBuilder spec:
((from ocaml/opam:debian-13-ocaml-4.14@sha256:cda000de9eec4a5cd6ab249d75a73bfb5e392c1745c5121432c7418ad5cf8adf)
(comment debian-13-4.14_riscv64_opam-2.4)
(user (uid 1000) (gid 1000))
(env CLICOLOR_FORCE 1)
(env OPAMCOLOR always)
(workdir /src)
(run (shell "sudo ln -f /usr/bin/opam-2.4 /usr/bin/opam"))
(run (shell "opam init --reinit -ni"))
(run (shell "uname -rs && opam exec -- ocaml -version && opam --version"))
(workdir /src)
(run (shell "sudo chown opam /src"))
(run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "cd ~/opam-repository && (git cat-file -e 8a324a5b9945e0e515da441ede437f3756caa83d || git fetch origin master) && git reset -q --hard 8a324a5b9945e0e515da441ede437f3756caa83d && git log --no-decorate -n1 --oneline && opam update -u"))
(copy (src atdts.opam atds.opam atdpy.opam atdj.opam atdgen.opam atdgen-runtime.opam atdgen-codec-runtime.opam atdd.opam atdcpp.opam atd.opam)
(dst ./))
(run (network host)
(shell  "opam pin add -yn atdts.dev './' && \
\nopam pin add -yn atds.dev './' && \
\nopam pin add -yn atdpy.dev './' && \
\nopam pin add -yn atdj.dev './' && \
\nopam pin add -yn atdgen.dev './' && \
\nopam pin add -yn atdgen-runtime.dev './' && \
\nopam pin add -yn atdgen-codec-runtime.dev './' && \
\nopam pin add -yn atdd.dev './' && \
\nopam pin add -yn atdcpp.dev './' && \
\nopam pin add -yn atd.dev './'"))
(run (network host)
(shell "echo '(lang dune 3.0)' > './dune-project'"))
(env DEPS "alcotest.1.9.1 astring.0.8.5 base-bigarray.base base-threads.base base-unix.base biniou.1.2.2 camlp-streams.5.0.1 cmdliner.2.1.0 conf-python-3.9.0.0 dune.3.20.2 easy-format.1.3.4 fmt.0.11.0 menhir.20250912 menhirCST.20250912 menhirLib.20250912 menhirSdk.20250912 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-config.2 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocamlbuild.0.16.1 ocamlfind.1.9.8 re.1.14.0 seq.base stdlib-shims.0.3.0 topkg.1.1.1 uutf.1.0.4 yojson.2.2.2")
(env CI true)
(env OCAMLCI true)
(run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "opam update --depexts && opam install --cli=2.4 --depext-only -y atdts.dev atds.dev atdpy.dev atdj.dev atdgen.dev atdgen-runtime.dev atdgen-codec-runtime.dev atdd.dev atdcpp.dev atd.dev $DEPS"))
(run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "opam install $DEPS"))
(copy (src .) (dst /src))
(run (shell "opam exec -- dune build @install @check @runtest && rm -rf _build"))
)


2025-12-09 19:39.05: Waiting for resource in pool OCluster
2025-12-09 19:39.05: Waiting for worker…
2025-12-09 20:44.00: Got resource from pool OCluster
Building on riscv-bm-04.sw.ci.dev
HEAD is now at 7757273 Bring back start_any_variant
HEAD is now at 9b2abd5 Import the missing Yojson functions 'start_any_variant' and 'start_any_tuple' which were accidentally removed from Yojson.


(from ocaml/opam:debian-13-ocaml-4.14@sha256:cda000de9eec4a5cd6ab249d75a73bfb5e392c1745c5121432c7418ad5cf8adf)
Unable to find image 'ocaml/opam:debian-13-ocaml-4.14@sha256:cda000de9eec4a5cd6ab249d75a73bfb5e392c1745c5121432c7418ad5cf8adf' locally
docker.io/ocaml/opam@sha256:cda000de9eec4a5cd6ab249d75a73bfb5e392c1745c5121432c7418ad5cf8adf: Pulling from ocaml/opam
de6b66e2abcf: Already exists
f69676b5bf8f: Pulling fs layer
bd99c0c73b96: Pulling fs layer
f210851d5991: Pulling fs layer
594b880773c5: Pulling fs layer
88a6edaecebc: Pulling fs layer
8c35beb4616c: Pulling fs layer
e8a4d2e94f85: Pulling fs layer
d0f326f9e9ec: Pulling fs layer
956d5e78253b: Pulling fs layer
7954f716a115: Pulling fs layer
581e2c81493a: Pulling fs layer
5529fc0e1c40: Pulling fs layer
79db350ffd3e: Pulling fs layer
cc43366a44e4: Pulling fs layer
63496b557f2e: Pulling fs layer
357540a23278: Pulling fs layer
9c33f166bcc4: Pulling fs layer
fe47bb149eab: Pulling fs layer
8e454fb1c5ba: Pulling fs layer
e65b908a43b4: Pulling fs layer
4f4fb700ef54: Pulling fs layer
ef05e6691b99: Pulling fs layer
bc5b14d5098c: Pulling fs layer
581e2c81493a: Waiting
5529fc0e1c40: Waiting
79db350ffd3e: Waiting
7f3be6720340: Pulling fs layer
6a2fceda0a19: Pulling fs layer
92ebb3103569: Pulling fs layer
097a5f6d220f: Pulling fs layer
a2f2cdd57c97: Pulling fs layer
4b459e121afa: Pulling fs layer
feea11194646: Pulling fs layer
20fc9743e971: Pulling fs layer
ae11f1720a91: Pulling fs layer
6436fc53390a: Pulling fs layer
1f45d3f5393a: Pulling fs layer
8259f056cd2d: Pulling fs layer
38957e560f26: Pulling fs layer
5afd09ced062: Pulling fs layer
2b07726c09d1: Pulling fs layer
a5b0a9ef817f: Pulling fs layer
4c49558dbf06: Pulling fs layer
ff7cea3f4ac5: Pulling fs layer
83ed2be0386b: Pulling fs layer
b110f90dc31d: Pulling fs layer
63496b557f2e: Waiting
357540a23278: Waiting
9c33f166bcc4: Waiting
fe47bb149eab: Waiting
8e454fb1c5ba: Waiting
e65b908a43b4: Waiting
4f4fb700ef54: Waiting
ef05e6691b99: Waiting
cc43366a44e4: Waiting
bc5b14d5098c: Waiting
7f3be6720340: Waiting
6a2fceda0a19: Waiting
92ebb3103569: Waiting
097a5f6d220f: Waiting
a2f2cdd57c97: Waiting
4b459e121afa: Waiting
feea11194646: Waiting
20fc9743e971: Waiting
ae11f1720a91: Waiting
594b880773c5: Waiting
88a6edaecebc: Waiting
8c35beb4616c: Waiting
e8a4d2e94f85: Waiting
d0f326f9e9ec: Waiting
956d5e78253b: Waiting
7954f716a115: Waiting
6436fc53390a: Waiting
1f45d3f5393a: Waiting
2b07726c09d1: Waiting
8259f056cd2d: Waiting
a5b0a9ef817f: Waiting
38957e560f26: Waiting
5afd09ced062: Waiting
4c49558dbf06: Waiting
ff7cea3f4ac5: Waiting
b110f90dc31d: Waiting
bd99c0c73b96: Verifying Checksum
bd99c0c73b96: Download complete
f69676b5bf8f: Verifying Checksum
f69676b5bf8f: Pull complete
bd99c0c73b96: Pull complete
594b880773c5: Verifying Checksum
594b880773c5: Download complete
f210851d5991: Verifying Checksum
f210851d5991: Download complete
e8a4d2e94f85: Download complete
f210851d5991: Pull complete
594b880773c5: Pull complete
8c35beb4616c: Verifying Checksum
8c35beb4616c: Download complete
d0f326f9e9ec: Verifying Checksum
d0f326f9e9ec: Download complete
956d5e78253b: Verifying Checksum
956d5e78253b: Download complete
7954f716a115: Verifying Checksum
7954f716a115: Download complete
581e2c81493a: Verifying Checksum
581e2c81493a: Download complete
79db350ffd3e: Verifying Checksum
79db350ffd3e: Download complete
5529fc0e1c40: Verifying Checksum
5529fc0e1c40: Download complete
cc43366a44e4: Verifying Checksum
cc43366a44e4: Download complete
63496b557f2e: Download complete
357540a23278: Verifying Checksum
357540a23278: Download complete
9c33f166bcc4: Verifying Checksum
9c33f166bcc4: Download complete
fe47bb149eab: Verifying Checksum
fe47bb149eab: Download complete
e65b908a43b4: Verifying Checksum
e65b908a43b4: Download complete
8e454fb1c5ba: Verifying Checksum
8e454fb1c5ba: Download complete
4f4fb700ef54: Verifying Checksum
ef05e6691b99: Download complete
bc5b14d5098c: Verifying Checksum
bc5b14d5098c: Download complete
7f3be6720340: Verifying Checksum
7f3be6720340: Download complete
6a2fceda0a19: Verifying Checksum
6a2fceda0a19: Download complete
92ebb3103569: Verifying Checksum
92ebb3103569: Download complete
097a5f6d220f: Download complete
a2f2cdd57c97: Verifying Checksum
a2f2cdd57c97: Download complete
4b459e121afa: Verifying Checksum
4b459e121afa: Download complete
feea11194646: Verifying Checksum
feea11194646: Download complete
ae11f1720a91: Verifying Checksum
ae11f1720a91: Download complete
20fc9743e971: Download complete
6436fc53390a: Verifying Checksum
6436fc53390a: Download complete
8259f056cd2d: Verifying Checksum
8259f056cd2d: Download complete
88a6edaecebc: Download complete
5afd09ced062: Download complete
2b07726c09d1: Verifying Checksum
2b07726c09d1: Download complete
a5b0a9ef817f: Download complete
38957e560f26: Verifying Checksum
38957e560f26: Download complete
ff7cea3f4ac5: Verifying Checksum
ff7cea3f4ac5: Download complete
83ed2be0386b: Verifying Checksum
83ed2be0386b: Download complete
b110f90dc31d: Download complete
4c49558dbf06: Verifying Checksum
1f45d3f5393a: Verifying Checksum
1f45d3f5393a: Download complete
88a6edaecebc: Pull complete
8c35beb4616c: Pull complete
e8a4d2e94f85: Pull complete
d0f326f9e9ec: Pull complete
956d5e78253b: Pull complete
7954f716a115: Pull complete
581e2c81493a: Pull complete
5529fc0e1c40: Pull complete
79db350ffd3e: Pull complete
cc43366a44e4: Pull complete
63496b557f2e: Pull complete
357540a23278: Pull complete
9c33f166bcc4: Pull complete
fe47bb149eab: Pull complete
8e454fb1c5ba: Pull complete
e65b908a43b4: Pull complete
4f4fb700ef54: Pull complete
ef05e6691b99: Pull complete
bc5b14d5098c: Pull complete
7f3be6720340: Pull complete
6a2fceda0a19: Pull complete
92ebb3103569: Pull complete
097a5f6d220f: Pull complete
a2f2cdd57c97: Pull complete
4b459e121afa: Pull complete
feea11194646: Pull complete
20fc9743e971: Pull complete
ae11f1720a91: Pull complete
6436fc53390a: Pull complete
1f45d3f5393a: Pull complete
8259f056cd2d: Pull complete
38957e560f26: Pull complete
5afd09ced062: Pull complete
2b07726c09d1: Pull complete
a5b0a9ef817f: Pull complete
4c49558dbf06: Pull complete
ff7cea3f4ac5: Pull complete
83ed2be0386b: Pull complete
b110f90dc31d: Pull complete
Digest: sha256:cda000de9eec4a5cd6ab249d75a73bfb5e392c1745c5121432c7418ad5cf8adf
Status: Downloaded newer image for ocaml/opam@sha256:cda000de9eec4a5cd6ab249d75a73bfb5e392c1745c5121432c7418ad5cf8adf
2025-12-09 20:44.02 ---> using "d92264e4bdf2426bd0a75a28e8d5f200891b44df8f32fb9f00ff584244f2cacb" from cache


/: (comment debian-13-4.14_riscv64_opam-2.4)


/: (user (uid 1000) (gid 1000))


/: (env CLICOLOR_FORCE 1)


/: (env OPAMCOLOR always)


/: (workdir /src)


/src: (run (shell "sudo ln -f /usr/bin/opam-2.4 /usr/bin/opam"))
2025-12-09 20:44.02 ---> using "70cfd89a534ac32b8a03cf7388e0fdb61301f41aaa19dcb6b61dd3f55663ba27" from cache


/src: (run (shell "opam init --reinit -ni"))
Configuring from /home/opam/.opamrc and then from built-in defaults.
Checking for available remotes: rsync and local, git.
- you won't be able to use mercurial repositories unless you install the hg command on your system.
- you won't be able to use darcs repositories unless you install the darcs command on your system.


This version of opam requires an update to the layout of /home/opam/.opam from version 2.0 to version 2.2, which can't be reverted.
You may want to back it up before going further.


Continue? [Y/n] y
Format upgrade done.


<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised
2025-12-09 20:44.02 ---> using "f74819040769082e49a9fea58a1427a0a67d742a64946c725f49c09310b0db0e" from cache


/src: (run (shell "uname -rs && opam exec -- ocaml -version && opam --version"))
Linux 5.10.113-scw1
The OCaml toplevel, version 4.14.2
2.4.1
2025-12-09 20:44.02 ---> using "7434d0a37580c0b39246a6cf4a080a75f3e363f86d91ab3095645c56a45f9c6c" from cache


/src: (workdir /src)


/src: (run (shell "sudo chown opam /src"))
2025-12-09 20:44.02 ---> using "a30671c3bcc6f8fdaa41418ca2da6a16da8c27e6903e7bfab47cdbafd215b563" from cache


/src: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "cd ~/opam-repository && (git cat-file -e 8a324a5b9945e0e515da441ede437f3756caa83d || git fetch origin master) && git reset -q --hard 8a324a5b9945e0e515da441ede437f3756caa83d && git log --no-decorate -n1 --oneline && opam update -u"))
From https://github.com/ocaml/opam-repository
* branch                  master     -> FETCH_HEAD
21f97b2e6d..2e91c1385f  master     -> origin/master
8a324a5b99 Add: cmdliner.2.1.0 (#28962)


<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[default] synchronised from git+file:///home/opam/opam-repository


Everything as up-to-date as possible (run with --verbose to show unavailable upgrades).
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade ocaml.5.4.0"), which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
# To update the current shell environment, run: eval $(opam env)
2025-12-09 20:44.02 ---> using "85e1cb04592ad7c40cdf9717ff0d1ccf282a107941e119cd3063d4ee6250ec87" from cache


/src: (copy (src atdts.opam atds.opam atdpy.opam atdj.opam atdgen.opam atdgen-runtime.opam atdgen-codec-runtime.opam atdd.opam atdcpp.opam atd.opam)
(dst ./))
2025-12-09 20:44.02 ---> using "fd5801045da2564bc68c84ff689a63408ef27960efb35857d0a3c9e41f436a58" from cache


/src: (run (network host)
(shell  "opam pin add -yn atdts.dev './' && \
\nopam pin add -yn atds.dev './' && \
\nopam pin add -yn atdpy.dev './' && \
\nopam pin add -yn atdj.dev './' && \
\nopam pin add -yn atdgen.dev './' && \
\nopam pin add -yn atdgen-runtime.dev './' && \
\nopam pin add -yn atdgen-codec-runtime.dev './' && \
\nopam pin add -yn atdd.dev './' && \
\nopam pin add -yn atdcpp.dev './' && \
\nopam pin add -yn atd.dev './'"))
[atdts.dev] synchronised (file:///src)
atdts is now pinned to file:///src (version dev)
[atds.dev] synchronised (file:///src)
atds is now pinned to file:///src (version dev)
[atdpy.dev] synchronised (file:///src)
atdpy is now pinned to file:///src (version dev)
[atdj.dev] synchronised (file:///src)
atdj is now pinned to file:///src (version dev)
[atdgen.dev] synchronised (file:///src)
atdgen is now pinned to file:///src (version dev)
[atdgen-runtime.dev] synchronised (file:///src)
atdgen-runtime is now pinned to file:///src (version dev)
[atdgen-codec-runtime.dev] synchronised (file:///src)
atdgen-codec-runtime is now pinned to file:///src (version dev)
[atdd.dev] synchronised (file:///src)
atdd is now pinned to file:///src (version dev)
[atdcpp.dev] synchronised (file:///src)
atdcpp is now pinned to file:///src (version dev)
[atd.dev] synchronised (file:///src)
atd is now pinned to file:///src (version dev)
2025-12-09 20:44.02 ---> using "d50442dc55a3321055c36a8461af710b252bdfc60b011612df218ffa6bca1dc0" from cache


/src: (run (network host)
(shell "echo '(lang dune 3.0)' > './dune-project'"))
2025-12-09 20:44.02 ---> using "36baf794fc859505302ef082366a279659bbd8d05fdcd7aa957cc28a2cf20aea" from cache


/src: (env DEPS "alcotest.1.9.1 astring.0.8.5 base-bigarray.base base-threads.base base-unix.base biniou.1.2.2 camlp-streams.5.0.1 cmdliner.2.1.0 conf-python-3.9.0.0 dune.3.20.2 easy-format.1.3.4 fmt.0.11.0 menhir.20250912 menhirCST.20250912 menhirLib.20250912 menhirSdk.20250912 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-config.2 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocamlbuild.0.16.1 ocamlfind.1.9.8 re.1.14.0 seq.base stdlib-shims.0.3.0 topkg.1.1.1 uutf.1.0.4 yojson.2.2.2")


/src: (env CI true)


/src: (env OCAMLCI true)


/src: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "opam update --depexts && opam install --cli=2.4 --depext-only -y atdts.dev atds.dev atdpy.dev atdj.dev atdgen.dev atdgen-runtime.dev atdgen-codec-runtime.dev atdd.dev atdcpp.dev atd.dev $DEPS"))
+ /usr/bin/sudo "apt-get" "update"
- Get:1 http://deb.debian.org/debian trixie InRelease [140 kB]
- Get:2 http://deb.debian.org/debian trixie-updates InRelease [47.3 kB]
- Get:3 http://deb.debian.org/debian-security trixie-security InRelease [43.4 kB]
- Get:4 http://deb.debian.org/debian trixie/main riscv64 Packages [9379 kB]
- Get:5 http://deb.debian.org/debian-security trixie-security/main riscv64 Packages [74.1 kB]
- Fetched 9685 kB in 5s (1907 kB/s)
- Reading package lists...
- 


<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[atd.dev] synchronised (file:///src)
[atdcpp.dev] synchronised (file:///src)
[atdd.dev] synchronised (file:///src)
[atdgen.dev] synchronised (file:///src)
[atdgen-codec-runtime.dev] synchronised (file:///src)
[atdgen-runtime.dev] synchronised (file:///src)
[atdj.dev] synchronised (file:///src)
[atdpy.dev] synchronised (file:///src)
[atds.dev] synchronised (file:///src)
[atdts.dev] synchronised (file:///src)


[NOTE] Package ocaml-options-vanilla is already installed (current version is 1).
[NOTE] Package ocaml-config is already installed (current version is 2).
[NOTE] Package ocaml-base-compiler is already installed (current version is 4.14.2).
[NOTE] Package ocaml is already installed (current version is 4.14.2).
[NOTE] Package base-unix is already installed (current version is base).
[NOTE] Package base-threads is already installed (current version is base).
[NOTE] Package base-bigarray is already installed (current version is base).


The following system packages will first need to be installed:
python3


<><> Handling external dependencies <><><><><><><><><><><><><><><><><><><><><><>


+ /usr/bin/sudo "apt-get" "install" "-qq" "-yy" "python3"
- Selecting previously unselected package libpython3.13-minimal:riscv64.
- (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 20700 files and directories currently installed.)
- Preparing to unpack .../libpython3.13-minimal_3.13.5-2_riscv64.deb ...
- Unpacking libpython3.13-minimal:riscv64 (3.13.5-2) ...
- Selecting previously unselected package python3.13-minimal.
- Preparing to unpack .../python3.13-minimal_3.13.5-2_riscv64.deb ...
- Unpacking python3.13-minimal (3.13.5-2) ...
- Setting up libpython3.13-minimal:riscv64 (3.13.5-2) ...
- Setting up python3.13-minimal (3.13.5-2) ...
- Selecting previously unselected package python3-minimal.
- (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 21025 files and directories currently installed.)
- Preparing to unpack .../0-python3-minimal_3.13.5-1_riscv64.deb ...
- Unpacking python3-minimal (3.13.5-1) ...
- Selecting previously unselected package media-types.
- Preparing to unpack .../1-media-types_13.0.0_all.deb ...
- Unpacking media-types (13.0.0) ...
- Selecting previously unselected package readline-common.
- Preparing to unpack .../2-readline-common_8.2-6_all.deb ...
- Unpacking readline-common (8.2-6) ...
- Selecting previously unselected package libreadline8t64:riscv64.
- Preparing to unpack .../3-libreadline8t64_8.2-6_riscv64.deb ...
- Adding 'diversion of /lib/riscv64-linux-gnu/libhistory.so.8 to /lib/riscv64-linux-gnu/libhistory.so.8.usr-is-merged by libreadline8t64'
- Adding 'diversion of /lib/riscv64-linux-gnu/libhistory.so.8.2 to /lib/riscv64-linux-gnu/libhistory.so.8.2.usr-is-merged by libreadline8t64'
- Adding 'diversion of /lib/riscv64-linux-gnu/libreadline.so.8 to /lib/riscv64-linux-gnu/libreadline.so.8.usr-is-merged by libreadline8t64'
- Adding 'diversion of /lib/riscv64-linux-gnu/libreadline.so.8.2 to /lib/riscv64-linux-gnu/libreadline.so.8.2.usr-is-merged by libreadline8t64'
- Unpacking libreadline8t64:riscv64 (8.2-6) ...
- Selecting previously unselected package libpython3.13-stdlib:riscv64.
- Preparing to unpack .../4-libpython3.13-stdlib_3.13.5-2_riscv64.deb ...
- Unpacking libpython3.13-stdlib:riscv64 (3.13.5-2) ...
- Selecting previously unselected package python3.13.
- Preparing to unpack .../5-python3.13_3.13.5-2_riscv64.deb ...
- Unpacking python3.13 (3.13.5-2) ...
- Selecting previously unselected package libpython3-stdlib:riscv64.
- Preparing to unpack .../6-libpython3-stdlib_3.13.5-1_riscv64.deb ...
- Unpacking libpython3-stdlib:riscv64 (3.13.5-1) ...
- Setting up python3-minimal (3.13.5-1) ...
- Selecting previously unselected package python3.
- (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 21511 files and directories currently installed.)
- Preparing to unpack .../python3_3.13.5-1_riscv64.deb ...
- Unpacking python3 (3.13.5-1) ...
- Setting up media-types (13.0.0) ...
- Setting up readline-common (8.2-6) ...
- Setting up libreadline8t64:riscv64 (8.2-6) ...
- Setting up libpython3.13-stdlib:riscv64 (3.13.5-2) ...
- Setting up libpython3-stdlib:riscv64 (3.13.5-1) ...
- Setting up python3.13 (3.13.5-2) ...
- Setting up python3 (3.13.5-1) ...
- running python rtupdate hooks for python3.13...
- running python post-rtupdate hooks for python3.13...
- Processing triggers for libc-bin (2.41-12) ...
2025-12-09 20:44.02 ---> using "ef0808dcb8d03c2f970e1fac87d29302a3572b2a3e2922694d51a4c1698e0db0" from cache


/src: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "opam install $DEPS"))
[NOTE] Package ocaml-options-vanilla is already installed (current version is 1).
[NOTE] Package ocaml-config is already installed (current version is 2).
[NOTE] Package ocaml-base-compiler is already installed (current version is 4.14.2).
[NOTE] Package ocaml is already installed (current version is 4.14.2).
[NOTE] Package base-unix is already installed (current version is base).
[NOTE] Package base-threads is already installed (current version is base).
[NOTE] Package base-bigarray is already installed (current version is base).
The following actions will be performed:
=== install 22 packages
- install alcotest           1.9.1
- install astring            0.8.5
- install biniou             1.2.2
- install camlp-streams      5.0.1
- install cmdliner           2.1.0
- install conf-python-3      9.0.0
- install dune               3.20.2
- install easy-format        1.3.4
- install fmt                0.11.0
- install menhir             20250912
- install menhirCST          20250912
- install menhirLib          20250912
- install menhirSdk          20250912
- install ocaml-syntax-shims 1.0.0
- install ocamlbuild         0.16.1
- install ocamlfind          1.9.8
- install re                 1.14.0
- install seq                base
- install stdlib-shims       0.3.0
- install topkg              1.1.1
- install uutf               1.0.4
- install yojson             2.2.2


<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved alcotest.1.9.1  (cached)
-> retrieved astring.0.8.5  (cached)
-> retrieved biniou.1.2.2  (cached)
-> retrieved conf-python-3.9.0.0  (cached)
-> retrieved camlp-streams.5.0.1  (cached)
-> retrieved cmdliner.2.1.0  (cached)
-> installed conf-python-3.9.0.0
-> retrieved easy-format.1.3.4  (cached)
-> retrieved fmt.0.11.0  (cached)
-> retrieved ocaml-syntax-shims.1.0.0  (cached)
-> retrieved ocamlbuild.0.16.1  (cached)
-> retrieved menhir.20250912, menhirCST.20250912, menhirLib.20250912, menhirSdk.20250912  (cached)
-> retrieved dune.3.20.2  (cached)
-> retrieved seq.base  (cached)
-> retrieved ocamlfind.1.9.8  (cached)
-> retrieved re.1.14.0  (cached)
-> retrieved stdlib-shims.0.3.0  (cached)
-> retrieved topkg.1.1.1  (cached)
-> retrieved uutf.1.0.4  (cached)
-> retrieved yojson.2.2.2  (cached)
-> installed cmdliner.2.1.0
-> installed ocamlfind.1.9.8
-> installed seq.base
-> installed ocamlbuild.0.16.1
-> installed topkg.1.1.1
-> installed fmt.0.11.0
-> installed astring.0.8.5
-> installed uutf.1.0.4
-> installed dune.3.20.2
-> installed easy-format.1.3.4
-> installed camlp-streams.5.0.1
-> installed menhirCST.20250912
-> installed menhirSdk.20250912
-> installed menhirLib.20250912
-> installed biniou.1.2.2
-> installed ocaml-syntax-shims.1.0.0
-> installed stdlib-shims.0.3.0
-> installed re.1.14.0
-> installed yojson.2.2.2
-> installed alcotest.1.9.1
-> installed menhir.20250912
Done.
# To update the current shell environment, run: eval $(opam env)
2025-12-09 20:44.02 ---> using "bacd038ef7b98658e76a4c9315b7344a9359b19a6c4c4c56a44313eabfc0ea66" from cache


/src: (copy (src .) (dst /src))
2025-12-09 20:44.04 ---> saved as "a08909d039807323b3feda1cecd438371c28f34ded6d02620bf3ac698d6a053e"


/src: (run (shell "opam exec -- dune build @install @check @runtest && rm -rf _build"))
(cd _build/default/atdts/src/test && ./Main.exe)
Testing `atdts'.
This run has ID `113AR4AE'.


Full test results in `/src/_build/default/atdts/src/test/_build/_tests/atdts'.
Test Successful in 0.000s. 0 test run.
(cd _build/default/atd/test && ./unit_tests.exe)
Testing `atd'.
This run has ID `EZ0H0NV2'.


[OK]          Annot                0   valid.
[OK]          Annot                1   invalid1.
[OK]          Annot                2   invalid2.
[OK]          Annot                3   invalid3.
[OK]          Annot                4   invalid4.
[OK]          Annot                5   invalid5.
[OK]          Annot                6   invalid6.
[OK]          Annot                7   invalid7.
[OK]          Annot                8   invalid8.
[OK]          Annot                9   invalid9.
[OK]          Sort                 0   sort.
[OK]          Unique_name          0   reserved identifiers.
[OK]          Unique_name          1   reserved prefixes.
[OK]          Unique_name          2   identifier creation.
[OK]          Doc                  0   normalize "".
[OK]          Doc                  1   normalize "a".
[OK]          Doc                  2   normalize "a b".
[OK]          Doc                  3   normalize "a\nb".
[OK]          Doc                  4   normalize "a  b".
[OK]          Doc                  5   normalize "a \n b".
[OK]          Doc                  6   normalize "a \n\n b".
[OK]          Doc                  7   normalize "  a  ".
[OK]          Doc                  8   normalize "\n\na\n\n".
[OK]          Doc                  9   normalize "{{}}".
[OK]          Doc                 10   normalize "{{a}}".
[OK]          Doc                 11   normalize "{{  a  b\n\nc\n }}".
[OK]          Doc                 12   normalize "{{ {a} }}".
[OK]          Doc                 13   normalize "{{{}}}".
[OK]          Doc                 14   normalize "{{{a}}}".
[OK]          Doc                 15   normalize "{{{ }}}".
[OK]          Doc                 16   normalize "{{{ {{a}} }}}".
[OK]          Doc                 17   normalize "{{{ a\n\n  b }}}".


Full test results in `/src/_build/default/atd/test/_build/_tests/atd'.
Test Successful in 0.030s. 32 tests run.
File "atdd/test/dlang-tests/dune", lines 17-26, characters 0-141:
17 | (rule
18 |  (alias runtest)
19 |  (package atdd)
20 |  (deps
21 |   (glob_files *.d))
22 |  (action
23 |   (progn
24 |    (bash "ldc2 %{deps} --of test")
25 |    (bash ./test)
26 |   )))
(cd _build/default/atdd/test/dlang-tests && /usr/bin/bash -e -u -o pipefail -c 'ldc2 everything_atd.d test_atdd.d --of test')
/usr/bin/bash: line 1: ldc2: command not found
File "atdcat/test/dune", lines 57-87, characters 0-907:
57 | (rule
58 |  (alias runtest)
59 |  (deps
....
85 |    )
86 |  )
87 | )
(cd _build/default/atdcat/test && /usr/bin/python3 -m jsonschema schema.json -i data.json)
/usr/bin/python3: No module named jsonschema
(cd _build/default/atdpy/src/test && ./Main.exe)
Testing `atdpy'.
This run has ID `7ICQ3LPE'.


Full test results in `/src/_build/default/atdpy/src/test/_build/_tests/atdpy'.
Test Successful in 0.000s. 0 test run.
File "atdpy/test/python-tests/dune", lines 19-29, characters 0-198:
19 | (rule
20 |  (alias runtest)
21 |  (package atdpy)
22 |  (deps
23 |   everything.py
24 |   (glob_files *.py))
25 |  (action
26 |   (progn
27 |    (run python3 -m flake8 .)
28 |    (run python3 -m mypy --strict .)
29 |    (run python3 -m pytest .))))
(cd _build/default/atdpy/test/python-tests && /usr/bin/python3 -m flake8 .)
/usr/bin/python3: No module named flake8
File "atds/test/dune", lines 13-22, characters 0-177:
13 | (rule
14 |  (alias runtest)
15 |  (package atds)
16 |  (deps
17 |   AtdsTest.scala
18 |   argonaut_2.11-6.2.2.jar
19 |   argonaut_2.12-6.2.2.jar
20 |   junit-4.8.2.jar
21 |   test.scala)
22 |  (action (run ./run_test.sh)))
(cd _build/default/atds/test && ./run_test.sh)
./run_test.sh: 6: scalac: not found
File "atdcpp/test/cpp-tests/dune", lines 19-28, characters 0-183:
19 | (rule
20 |  (alias runtest)
21 |  (package atdcpp)
22 |  (deps
23 |   (glob_files *.cpp))
24 |  (action
25 |   (progn
26 |    (bash "g++ -I../../lib/rapidjson/include -std=c++17 %{deps} -o test")
27 |    (bash ./test)
28 |   )))
(cd _build/default/atdcpp/test/cpp-tests && /usr/bin/bash -e -u -o pipefail -c 'g++ -I../../lib/rapidjson/include -std=c++17 everything_atd.cpp test_atdd.cpp -o test')
In file included from everything_atd.cpp:12:
everything_atd.hpp:12:10: fatal error: rapidjson/document.h: No such file or directory
12 | #include <rapidjson/document.h>
|          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from test_atdd.cpp:12:
everything_atd.hpp:12:10: fatal error: rapidjson/document.h: No such file or directory
12 | #include <rapidjson/document.h>
|          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
File "atdj/test/dune", lines 53-61, characters 0-160:
53 | (rule
54 |  (alias runtest)
55 |  (package atdj)
56 |  (deps
57 |   AtdjTest.java
58 |   json.jar
59 |   junit-4.8.2.jar
60 |   (glob_files com/mylife/test/*.java))
61 |  (action (run ./run_test.sh)))
(cd _build/default/atdj/test && ./run_test.sh)
./run_test.sh: 5: javac: not found
./run_test.sh: 6: javac: not found
./run_test.sh: 7: javadoc: not found
./run_test.sh: 10: java: not found
File "atdgen/test/melange/melangespec_j.expected.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/atdgen/test/melange/melangespec_j.expected.ml _build/default/atdgen/test/melange/melangespec_j.ml
diff --git a/_build/default/atdgen/test/melange/melangespec_j.expected.ml b/_build/default/atdgen/test/melange/melangespec_j.ml
index 5cba12b..c2ed7f4 100644
--- a/_build/default/atdgen/test/melange/melangespec_j.expected.ml
+++ b/_build/default/atdgen/test/melange/melangespec_j.ml
@@ -392,20 +392,7 @@ let string_of_with_open_enum ?(len = 1024) x =
let read_with_open_enum = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Alpha" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Alpha
-            | "Beta" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Beta
-            | x ->
-              `Other x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "Alpha" ->
@@ -467,20 +454,7 @@ let string_of_variant3 ?(len = 1024) x =
let read_variant3 = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "C" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (C : variant3)
-            | "B" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (B : variant3)
-            | x ->
-              (A x : variant3)
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "C" ->
@@ -511,20 +485,7 @@ let string_of_variant2 ?(len = 1024) x =
let read_variant2 = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "A" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (A : variant2)
-            | "C" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (C : variant2)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "A" ->
@@ -560,25 +521,7 @@ let string_of_variant1 ?(len = 1024) x =
let read_variant1 = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "A" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_string
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (A x : variant1)
-            | "B" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (B : variant1)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "B" ->
@@ -640,30 +583,7 @@ let string_of_v2 ?(len = 1024) x =
let read_v2 = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "V1_foo" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (V1_foo x : v2)
-            | "V2_bar" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_bool
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (V2_bar x : v2)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
@@ -722,30 +642,7 @@ let string_of_v1 ?(len = 1024) x =
let read_v1 = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "V1_foo" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_bool
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (V1_foo x : v1)
-            | "V2_bar" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (V2_bar x : v1)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
@@ -923,51 +820,7 @@ let string_of_single_tuple ?(len = 1024) x =
let read_single_tuple = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Single_tuple" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  fun p lb ->
-                    Yojson.Safe.read_space p lb;
-                    let std_tuple = Yojson.Safe.start_any_tuple p lb in
-                    let len = ref 0 in
-                    let end_of_tuple = ref false in
-                    (try
-                      let x0 =
-                        let x =
-                          (
-                            Atdgen_runtime.Oj_run.read_int
-                          ) p lb
-                        in
-                        incr len;
-                        (try
-                          Yojson.Safe.read_space p lb;
-                          Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                        with Yojson.End_of_tuple -> end_of_tuple := true);
-                        x
-                      in
-                      if not !end_of_tuple then (
-                        try
-                          while true do
-                            Yojson.Safe.skip_json p lb;
-                            Yojson.Safe.read_space p lb;
-                            Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                          done
-                        with Yojson.End_of_tuple -> ()
-                      );
-                      (x0)
-                    with Yojson.End_of_tuple ->
-                      Atdgen_runtime.Oj_run.missing_tuple_fields p !len [ 0 ]);
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Single_tuple x
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
@@ -1096,84 +949,7 @@ let string_of__unit_simple_var ?(len = 1024) x =
let read__unit_simple_var = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Foo" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  fun p lb ->
-                    Yojson.Safe.read_space p lb;
-                    let std_tuple = Yojson.Safe.start_any_tuple p lb in
-                    let len = ref 0 in
-                    let end_of_tuple = ref false in
-                    (try
-                      let x0 =
-                        let x =
-                          (
-                            Atdgen_runtime.Oj_run.read_int
-                          ) p lb
-                        in
-                        incr len;
-                        Yojson.Safe.read_space p lb;
-                        Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                        x
-                      in
-                      let x1 =
-                        let x =
-                          (
-                            Atdgen_runtime.Oj_run.read_int
-                          ) p lb
-                        in
-                        incr len;
-                        (try
-                          Yojson.Safe.read_space p lb;
-                          Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                        with Yojson.End_of_tuple -> end_of_tuple := true);
-                        x
-                      in
-                      if not !end_of_tuple then (
-                        try
-                          while true do
-                            Yojson.Safe.skip_json p lb;
-                            Yojson.Safe.read_space p lb;
-                            Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                          done
-                        with Yojson.End_of_tuple -> ()
-                      );
-                      (x0, x1)
-                    with Yojson.End_of_tuple ->
-                      Atdgen_runtime.Oj_run.missing_tuple_fields p !len [ 0; 1 ]);
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Foo x
-            | "Bar" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Bar
-            | "Foobar" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_null
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Foobar x
-            | "Foo_id" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_id
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Foo_id x
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "Bar" ->
@@ -1334,84 +1110,7 @@ let string_of_simple_var write__a ?(len = 1024) x =
let read_simple_var read__a = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Foo" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  fun p lb ->
-                    Yojson.Safe.read_space p lb;
-                    let std_tuple = Yojson.Safe.start_any_tuple p lb in
-                    let len = ref 0 in
-                    let end_of_tuple = ref false in
-                    (try
-                      let x0 =
-                        let x =
-                          (
-                            Atdgen_runtime.Oj_run.read_int
-                          ) p lb
-                        in
-                        incr len;
-                        Yojson.Safe.read_space p lb;
-                        Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                        x
-                      in
-                      let x1 =
-                        let x =
-                          (
-                            Atdgen_runtime.Oj_run.read_int
-                          ) p lb
-                        in
-                        incr len;
-                        (try
-                          Yojson.Safe.read_space p lb;
-                          Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                        with Yojson.End_of_tuple -> end_of_tuple := true);
-                        x
-                      in
-                      if not !end_of_tuple then (
-                        try
-                          while true do
-                            Yojson.Safe.skip_json p lb;
-                            Yojson.Safe.read_space p lb;
-                            Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                          done
-                        with Yojson.End_of_tuple -> ()
-                      );
-                      (x0, x1)
-                    with Yojson.End_of_tuple ->
-                      Atdgen_runtime.Oj_run.missing_tuple_fields p !len [ 0; 1 ]);
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Foo x
-            | "Bar" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Bar
-            | "Foobar" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read__a
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Foobar x
-            | "Foo_id" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_id
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Foo_id x
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "Bar" ->
@@ -2749,30 +2448,7 @@ let read_adapted = (
Atdgen_runtime.Oj_run.read_with_adapter Atdgen_codec_runtime.Json_adapter.Type_field.normalize (
fun p lb ->
Yojson.Safe.read_space p lb;
-      match Yojson.Safe.start_any_variant p lb with
-        | `Edgy_bracket -> (
-            match Yojson.Safe.read_ident p lb with
-              | "A" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    read_a
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                `A x
-              | "B" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    read_b
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                `B x
-              | x ->
-                Atdgen_runtime.Oj_run.invalid_variant_tag p x
-          )
+      match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
File "atdgen/test/test2j.expected.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/atdgen/test/test2j.expected.ml _build/default/atdgen/test/test2j.ml
diff --git a/_build/default/atdgen/test/test2j.expected.ml b/_build/default/atdgen/test/test2j.ml
index cea20a4..1f613c7 100644
--- a/_build/default/atdgen/test/test2j.expected.ml
+++ b/_build/default/atdgen/test/test2j.ml
@@ -52,25 +52,7 @@ let string_of__string_option ?(len = 1024) x =
let read__string_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_string
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
File "atdgen/test/test3j_j.expected.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/atdgen/test/test3j_j.expected.ml _build/default/atdgen/test/test3j_j.ml
diff --git a/_build/default/atdgen/test/test3j_j.expected.ml b/_build/default/atdgen/test/test3j_j.ml
index 5d74e97..77be75a 100644
--- a/_build/default/atdgen/test/test3j_j.expected.ml
+++ b/_build/default/atdgen/test/test3j_j.ml
@@ -261,80 +261,7 @@ let string_of_tf_variant2 ?(len = 1024) x =
let read_tf_variant2 = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "a" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `A x
-            | "b" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `B x
-            | "Unknown" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  fun p lb ->
-                    Yojson.Safe.read_space p lb;
-                    let std_tuple = Yojson.Safe.start_any_tuple p lb in
-                    let len = ref 0 in
-                    let end_of_tuple = ref false in
-                    (try
-                      let x0 =
-                        let x =
-                          (
-                            Atdgen_runtime.Oj_run.read_string
-                          ) p lb
-                        in
-                        incr len;
-                        Yojson.Safe.read_space p lb;
-                        Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                        x
-                      in
-                      let x1 =
-                        let x =
-                          (
-                            read__json_nullable
-                          ) p lb
-                        in
-                        incr len;
-                        (try
-                          Yojson.Safe.read_space p lb;
-                          Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                        with Yojson.End_of_tuple -> end_of_tuple := true);
-                        x
-                      in
-                      if not !end_of_tuple then (
-                        try
-                          while true do
-                            Yojson.Safe.skip_json p lb;
-                            Yojson.Safe.read_space p lb;
-                            Yojson.Safe.read_tuple_sep2 p std_tuple lb;
-                          done
-                        with Yojson.End_of_tuple -> ()
-                      );
-                      (x0, x1)
-                    with Yojson.End_of_tuple ->
-                      Atdgen_runtime.Oj_run.missing_tuple_fields p !len [ 0; 1 ]);
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Unknown x
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
@@ -445,30 +372,7 @@ let string_of_tf_variant ?(len = 1024) x =
let read_tf_variant = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "a" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `A x
-            | "b" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `B x
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
@@ -1064,30 +968,7 @@ let read_sf_adapted = (
Atdgen_runtime.Oj_run.read_with_adapter Atdgen_runtime.Json_adapter.One_field.normalize (
fun p lb ->
Yojson.Safe.read_space p lb;
-      match Yojson.Safe.start_any_variant p lb with
-        | `Edgy_bracket -> (
-            match Yojson.Safe.read_ident p lb with
-              | "a" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    Atdgen_runtime.Oj_run.read_bool
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                `A x
-              | "b" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    Atdgen_runtime.Oj_run.read_int
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                `B x
-              | x ->
-                Atdgen_runtime.Oj_run.invalid_variant_tag p x
-          )
+      match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
@@ -1140,20 +1021,7 @@ let string_of_sample_open_enum ?(len = 1024) x =
let read_sample_open_enum = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Alpha" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Alpha
-            | "Beta" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Beta
-            | x ->
-              `Other x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "Alpha" ->
@@ -1230,25 +1098,7 @@ let string_of__int_nullable_option ?(len = 1024) x =
let read__int_nullable_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read__int_nullable
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1734,30 +1584,7 @@ let read_adapted_f = (
Atdgen_runtime.Oj_run.read_with_adapter (Atdgen_runtime.Json_adapter.normalize_type_field "type") (
fun p lb ->
Yojson.Safe.read_space p lb;
-      match Yojson.Safe.start_any_variant p lb with
-        | `Edgy_bracket -> (
-            match Yojson.Safe.read_ident p lb with
-              | "fa" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    read_a
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                `FA x
-              | "fb" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    read_b
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                `FB x
-              | x ->
-                Atdgen_runtime.Oj_run.invalid_variant_tag p x
-          )
+      match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
@@ -1820,30 +1647,7 @@ let read_adapted = (
Atdgen_runtime.Oj_run.read_with_adapter Atdgen_runtime.Json_adapter.Type_field.normalize (
fun p lb ->
Yojson.Safe.read_space p lb;
-      match Yojson.Safe.start_any_variant p lb with
-        | `Edgy_bracket -> (
-            match Yojson.Safe.read_ident p lb with
-              | "a" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    read_a
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                `A x
-              | "b" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    read_b
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                `B x
-              | x ->
-                Atdgen_runtime.Oj_run.invalid_variant_tag p x
-          )
+      match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
File "atdgen/test/testjstd_j.expected.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/atdgen/test/testjstd_j.expected.ml _build/default/atdgen/test/testjstd_j.ml
diff --git a/_build/default/atdgen/test/testjstd_j.expected.ml b/_build/default/atdgen/test/testjstd_j.ml
index 21a5fc4..9c3659d 100644
--- a/_build/default/atdgen/test/testjstd_j.expected.ml
+++ b/_build/default/atdgen/test/testjstd_j.ml
@@ -197,34 +197,7 @@ and string_of_p' write__a ?(len = 1024) x =
let rec read_p' read__a = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "A" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (A : 'a p')
-            | "Bb" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_p' read__a
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Bb x : 'a p')
-            | "Ccccc" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read__a
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Ccccc x : 'a p')
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "A" ->
@@ -318,29 +291,7 @@ and string_of_r ?(len = 1024) x =
let rec read_p = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "A" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `A
-            | "B" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_r
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `B x
-            | "C" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `C
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "A" ->
@@ -554,43 +505,7 @@ and _test_variant_list_of_string s =
and read_test_variant = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Case1" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Case1
-            | "Case2" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Case2 x
-            | "Case3" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_string
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Case3 x
-            | "Case4" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read__test_variant_list
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Case4 x
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "Case1" ->
@@ -663,34 +578,7 @@ and string_of__int_p ?(len = 1024) x =
let rec read__int_p = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "A" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (A : _ p')
-            | "Bb" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read__int_p
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Bb x : _ p')
-            | "Ccccc" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Ccccc x : _ p')
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "A" ->
@@ -768,25 +656,7 @@ and string_of_poly write__x write__y ?(len = 1024) x =
let rec read__a_b_poly_option read__a read__b = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_poly read__a read__b
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1098,25 +968,7 @@ let string_of__val1_option ?(len = 1024) x =
let read__val1_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_val1
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1482,25 +1334,7 @@ let string_of__string_option ?(len = 1024) x =
let read__string_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_string
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1555,25 +1389,7 @@ let string_of__int_option ?(len = 1024) x =
let read__int_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1612,25 +1428,7 @@ let string_of__float_option ?(len = 1024) x =
let read__float_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_number
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1669,25 +1467,7 @@ let string_of__bool_option ?(len = 1024) x =
let read__bool_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_bool
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -3628,25 +3408,7 @@ let string_of__x_bee1b88 ?(len = 1024) x =
let read__x_bee1b88 = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -3933,25 +3695,7 @@ let string_of_hello ?(len = 1024) x =
let read_hello = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Hello" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_string
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Hello x
-            | "World" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `World
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "World" ->
File "atdgen/test/test_ambiguous_variant_j.expected.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/atdgen/test/test_ambiguous_variant_j.expected.ml _build/default/atdgen/test/test_ambiguous_variant_j.ml
diff --git a/_build/default/atdgen/test/test_ambiguous_variant_j.expected.ml b/_build/default/atdgen/test/test_ambiguous_variant_j.ml
index e5432e3..ed1a763 100644
--- a/_build/default/atdgen/test/test_ambiguous_variant_j.expected.ml
+++ b/_build/default/atdgen/test/test_ambiguous_variant_j.ml
@@ -37,30 +37,7 @@ let read_ambiguous' = (
Atdgen_runtime.Oj_run.read_with_adapter Json_adapters.Identity.normalize (
fun p lb ->
Yojson.Safe.read_space p lb;
-      match Yojson.Safe.start_any_variant p lb with
-        | `Edgy_bracket -> (
-            match Yojson.Safe.read_ident p lb with
-              | "Int" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    Atdgen_runtime.Oj_run.read_int
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                (Int x : ambiguous')
-              | "String" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    Atdgen_runtime.Oj_run.read_string
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                (String x : ambiguous')
-              | x ->
-                Atdgen_runtime.Oj_run.invalid_variant_tag p x
-          )
+      match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
@@ -123,30 +100,7 @@ let read_ambiguous = (
Atdgen_runtime.Oj_run.read_with_adapter Json_adapters.Identity.normalize (
fun p lb ->
Yojson.Safe.read_space p lb;
-      match Yojson.Safe.start_any_variant p lb with
-        | `Edgy_bracket -> (
-            match Yojson.Safe.read_ident p lb with
-              | "Int" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    Atdgen_runtime.Oj_run.read_int
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                (Int x : ambiguous)
-              | "String" ->
-                Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                let x = (
-                    Atdgen_runtime.Oj_run.read_string
-                  ) p lb
-                in
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_gt p lb;
-                (String x : ambiguous)
-              | x ->
-                Atdgen_runtime.Oj_run.invalid_variant_tag p x
-          )
+      match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
File "atdgen/test/test_classic_inline_record_j.expected.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/atdgen/test/test_classic_inline_record_j.expected.ml _build/default/atdgen/test/test_classic_inline_record_j.ml
diff --git a/_build/default/atdgen/test/test_classic_inline_record_j.expected.ml b/_build/default/atdgen/test/test_classic_inline_record_j.ml
index 81f9ccf..ad134fc 100644
--- a/_build/default/atdgen/test/test_classic_inline_record_j.expected.ml
+++ b/_build/default/atdgen/test/test_classic_inline_record_j.ml
@@ -40,129 +40,7 @@ let string_of_foo ?(len = 1024) x =
let read_foo = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Foo" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                Yojson.Safe.read_space p lb;
-                Yojson.Safe.read_lcurl p lb;
-                let field_x = ref (None) in
-                let field_y = ref (None) in
-                try
-                  Yojson.Safe.read_space p lb;
-                  Yojson.Safe.read_object_end lb;
-                  Yojson.Safe.read_space p lb;
-                  let f =
-                    fun s pos len ->
-                      if pos < 0 || len < 0 || pos + len > String.length s then
-                        invalid_arg (Printf.sprintf "out-of-bounds substring position or length: string = %S, requested position = %i, requested length = %i" s pos len);
-                      if len = 1 then (
-                        match String.unsafe_get s pos with
-                          | 'x' -> (
-                              0
-                            )
-                          | 'y' -> (
-                              1
-                            )
-                          | _ -> (
-                              -1
-                            )
-                      )
-                      else (
-                        -1
-                      )
-                  in
-                  let i = Yojson.Safe.map_ident p f lb in
-                  Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                  (
-                    match i with
-                      | 0 ->
-                        field_x := (
-                          Some (
-                            (
-                              Atdgen_runtime.Oj_run.read_int
-                            ) p lb
-                          )
-                        );
-                      | 1 ->
-                        field_y := (
-                          Some (
-                            (
-                              Atdgen_runtime.Oj_run.read_number
-                            ) p lb
-                          )
-                        );
-                      | _ -> (
-                          Yojson.Safe.skip_json p lb
-                        )
-                  );
-                  while true do
-                    Yojson.Safe.read_space p lb;
-                    Yojson.Safe.read_object_sep p lb;
-                    Yojson.Safe.read_space p lb;
-                    let f =
-                      fun s pos len ->
-                        if pos < 0 || len < 0 || pos + len > String.length s then
-                          invalid_arg (Printf.sprintf "out-of-bounds substring position or length: string = %S, requested position = %i, requested length = %i" s pos len);
-                        if len = 1 then (
-                          match String.unsafe_get s pos with
-                            | 'x' -> (
-                                0
-                              )
-                            | 'y' -> (
-                                1
-                              )
-                            | _ -> (
-                                -1
-                              )
-                        )
-                        else (
-                          -1
-                        )
-                    in
-                    let i = Yojson.Safe.map_ident p f lb in
-                    Atdgen_runtime.Oj_run.read_until_field_value p lb;
-                    (
-                      match i with
-                        | 0 ->
-                          field_x := (
-                            Some (
-                              (
-                                Atdgen_runtime.Oj_run.read_int
-                              ) p lb
-                            )
-                          );
-                        | 1 ->
-                          field_y := (
-                            Some (
-                              (
-                                Atdgen_runtime.Oj_run.read_number
-                              ) p lb
-                            )
-                          );
-                        | _ -> (
-                            Yojson.Safe.skip_json p lb
-                          )
-                    );
-                  done;
-                  assert false;
-                with Yojson.End_of_object -> (
-                    (Foo
-                      {
-                        x = (match !field_x with Some x -> x | None -> Atdgen_runtime.Oj_run.missing_field p "x");
-                        y = (match !field_y with Some x -> x | None -> Atdgen_runtime.Oj_run.missing_field p "y");
-                      }
-                     : foo)
-                  )
-              ) in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              x
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| x ->
File "atdgen/test/testj.expected.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/atdgen/test/testj.expected.ml _build/default/atdgen/test/testj.ml
diff --git a/_build/default/atdgen/test/testj.expected.ml b/_build/default/atdgen/test/testj.ml
index a99920c..74ba600 100644
--- a/_build/default/atdgen/test/testj.expected.ml
+++ b/_build/default/atdgen/test/testj.ml
@@ -197,34 +197,7 @@ and string_of_p' write__a ?(len = 1024) x =
let rec read_p' read__a = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "A" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (A : 'a p')
-            | "Bb" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_p' read__a
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Bb x : 'a p')
-            | "Ccccc" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read__a
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Ccccc x : 'a p')
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "A" ->
@@ -318,29 +291,7 @@ and string_of_r ?(len = 1024) x =
let rec read_p = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "A" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `A
-            | "B" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_r
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `B x
-            | "C" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `C
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "A" ->
@@ -558,43 +509,7 @@ and _test_variant_list_of_string s =
and read_test_variant = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Case1" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Case1
-            | "Case2" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Case2 x
-            | "Case3" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-let x = (
-                  Atdgen_runtime.Oj_run.read_string
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Case3 x
-            | "Case4" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read__test_variant_list
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Case4 x
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "Case1" ->
@@ -667,34 +582,7 @@ and string_of__int_p ?(len = 1024) x =
let rec read__int_p = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "A" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (A : _ p')
-            | "Bb" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read__int_p
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Bb x : _ p')
-            | "Ccccc" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Ccccc x : _ p')
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "A" ->
@@ -772,25 +660,7 @@ and string_of_poly write__x write__y ?(len = 1024) x =
let rec read__a_b_poly_option read__a read__b = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_poly read__a read__b
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1112,25 +982,7 @@ let string_of__val1_option ?(len = 1024) x =
let read__val1_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  read_val1
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1500,25 +1352,7 @@ let string_of__string_option ?(len = 1024) x =
let read__string_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_string
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1573,25 +1407,7 @@ let string_of__int_option ?(len = 1024) x =
let read__int_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1630,25 +1446,7 @@ let string_of__float_option ?(len = 1024) x =
let read__float_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_number
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -1687,25 +1485,7 @@ let string_of__bool_option ?(len = 1024) x =
let read__bool_option = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_bool
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -3684,25 +3464,7 @@ let string_of__x_bee1b88 ?(len = 1024) x =
let read__x_bee1b88 = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "None" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (None : _ option)
-            | "Some" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_int
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              (Some x : _ option)
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "None" ->
@@ -3989,25 +3751,7 @@ let string_of_hello ?(len = 1024) x =
let read_hello = (
fun p lb ->
Yojson.Safe.read_space p lb;
-    match Yojson.Safe.start_any_variant p lb with
-      | `Edgy_bracket -> (
-          match Yojson.Safe.read_ident p lb with
-            | "Hello" ->
-              Atdgen_runtime.Oj_run.read_until_field_value p lb;
-              let x = (
-                  Atdgen_runtime.Oj_run.read_string
-                ) p lb
-              in
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `Hello x
-            | "World" ->
-              Yojson.Safe.read_space p lb;
-              Yojson.Safe.read_gt p lb;
-              `World
-            | x ->
-              Atdgen_runtime.Oj_run.invalid_variant_tag p x
-        )
+    match Atdgen_runtime.Yojson_extra.start_any_variant p lb with
| `Double_quote -> (
match Yojson.Safe.finish_string p lb with
| "World" ->
File "atdgen/test/melange/dune", lines 48-51, characters 0-85:
48 | (rule
49 |  (alias runtest)
50 |  (package atdgen)
51 |  (action (run ./melangespec_roundtrip.exe)))
(cd _build/default/atdgen/test/melange && ./melangespec_roundtrip.exe)
encode list open enum: Roundtrip failed.
Have:[ "Alpha", "other" ]
Decoded:exn: Yojson__Common.Json_error("Line 1, bytes 1-19:\nExpected '\"' or '[' but found '<\"Alpha\">,\"other\"]'")
backtrace:


encode adapted variant b: Roundtrip failed.
Have:[ "B", { "thing": 1 } ]
Decoded:exn: Yojson__Common.Json_error("Line 1, bytes 0-17:\nExpected '\"' or '[' but found '<\"B\":{\"thing\":1}>'")
backtrace:


encode adapted variant a: Roundtrip failed.
Have:[ "A", { "other_thing": false, "thing": "thing" } ]
Decoded:exn: Yojson__Common.Json_error("Line 1, bytes 0-34:\nExpected '\"' or '[' but found '<\"A\":{\"other_thing\":false,\"thing\"'")
backtrace:


encode 1 tuple: Roundtrip failed.
Have:[ "Single_tuple", [ 123 ] ]
Decoded:exn: Yojson__Common.Json_error("Line 1, bytes 0-22:\nExpected '\"' or '[' but found '<\"Single_tuple\":(123)>'")
backtrace:


encode variant: Roundtrip failed.
Have:[
[ "Foo", [ 123, 456 ] ], "Bar", [ "Foobar", null ], [ "Foo_id", "testing" ]
]
Decoded:exn: Yojson__Common.Json_error("Line 1, bytes 1-35:\nExpected '\"' or '[' but found '<\"Foo\":(123,456)>,<\"Bar\">,<\"Fooba'")
backtrace:


(cd _build/default/atdgen/test && ./test_atdgen_main.exe)
Testing `atdgen'.
This run has ID `OYIZO0LJ'.


[OK]          atdgen          0   ocaml internals.
[OK]          atdgen          1   biniou missing record fields.
[OK]          atdgen          2   biniou missing tuple fields.
[OK]          atdgen          3   biniou read/write unit.
[OK]          atdgen          4   json missing record fields.
[OK]          atdgen          5   json missing tuple fields.
[OK]          atdgen          6   json extra field warning.
[OK]          atdgen          7   json association list.
[OK]          atdgen          8   json association array.
[OK]          atdgen          9   json ints derived from ocaml floats.
[OK]          atdgen         10   biniou correctness.
[OK]          atdgen         11   json correctness.
[OK]          atdgen         12   json space.
[OK]          atdgen         13   validators0.
[OK]          atdgen         14   validators1.
[OK]          atdgen         15   validators2.
[OK]          atdgen         16   validators3.
[OK]          atdgen         17   validators4.
[OK]          atdgen         18   json files.
[OK]          atdgen         19   json streams.
[OK]          atdgen         20   raw JSON.
[OK]          atdgen         21   ocaml wrapping - ints.
[OK]          atdgen         22   ocaml wrapping - double wrapping.
[OK]          atdgen         23   ocaml wrapping - with validation.
[OK]          atdgen         24   ocaml wrapping - wrap constructor without...
[OK]          atdgen         25   check length of floats serialized as floa...
[OK]          atdgen         26   print JSON floats with maximum number of ...
[OK]          atdgen         27   read json record with null fields meaning...
[OK]          atdgen         28   read and write a variant represented as a...
[OK]          atdgen         29   read and write a variant represented as a...
[OK]          atdgen         30   test variants represented with single-fie...
[OK]          atdgen         31   emulate the retired tag_field feature.
[OK]          atdgen         32   emulate the retired tag_field feature, wi...
[OK]          atdgen         33   test <json open_enum>.
[OK]          atdgen         34   test ambiguous record with json adapters.
[OK]          atdgen         35   test ambiguous classic variants with json...
[OK]          atdgen         36   test wrapping of polymorphic types.
[OK]          atdgen         37   json encoding int.
[OK]          atdgen         38   json encoding & decoding int.
[OK]          atdgen         39   json encoding int with string representat...
[OK]          atdgen         40   json encoding & decoding int with string ...
[OK]          atdgen         41   abstract types.
[OK]          atdgen         42   untyped json.
[OK]          atdgen         43   generic.
[OK]          atdgen         44   inline-records.


Full test results in `/src/_build/default/atdgen/test/_build/_tests/atdgen'.
Test Successful in 0.045s. 45 tests run.
"/usr/bin/env" "bash" "-c" "opam exec -- dune build @install @check @runtest && rm -rf _build" failed with exit status 1
2025-12-09 20:44.57: Job failed: Failed: Build failed