ahrefs/atd

`-bs` fails with unknown flag on atdgen 2.0.0 / ocaml 4.06.1

leostera opened this issue Β· 1 comments

Hello! thanks for the great work :)

I was trying to install and use atdgen in a project and after installing it with opam install atdgen, the version I have shows me a -bs option in the recommended usage yet fails with unknown option.

ostera/tldr.jsx Ξ» opam install atdgen
The following actions will be performed:
  βˆ— install atdgen 2.0.0

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
[atdgen.2.0.0] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
βˆ— installed atdgen.2.0.0
Done.
ostera/tldr.jsx Ξ» atdgen -bs tldr/github/API.atd
atdgen: unknown option '-bs'.
Generate OCaml code offering:
  * OCaml type definitions translated from ATD file (-t)
  * serializers and deserializers for Biniou (-b)
  * serializers and deserializers for JSON (-j)
  * record-creating functions supporting default fields (-v)
  * user-specified data validators (-v)

Recommended usage: atdgen (-t|-b|-j|-v|-dep|-list|-bs) example.atd

I've tried pinning it to --dev but then I can't install it, saying unbound module Re.

 stera/tldr.jsx Ξ» opam pin --dev atdgen
[atdgen.2.0.0] synchronised from git://github.com/mjambon/atd.git
atdgen is now pinned to git://github.com/mjambon/atd.git (version 2.0.0)

The following actions will be performed:
  ↻ recompile atdgen 2.0.0*
Do you want to continue? [Y/n] Y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
[ERROR] The compilation of atdgen failed at "/Users/ostera/.opam/opam-init/hooks/sandbox.sh build
        dune build -p atdgen -j 4".

#=== ERROR while compiling atdgen.2.0.0 =======================================#
# context     2.0.0 | macos/x86_64 | ocaml-base-compiler.4.06.1 | pinned(git://github.com/mjambon/atd.git#a349f22c)
# path        ~/.opam/4.06.1/.opam-switch/build/atdgen.2.0.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p atdgen -j 4
# exit-code   1
# env-file    ~/.opam/log/atdgen-53686-e4db2f.env
# output-file ~/.opam/log/atdgen-53686-e4db2f.out
### output ###
#     ocamlopt atdgen/src/.atdgen_emit.objs/atdgen_emit__Ocaml.{cmx,o} (exit 2)
# (cd _build/default && /Users/ostera/.opam/4.06.1/bin/ocamlopt.opt -w -40 -w -27 -safe-string -g -I atdgen/src/.atdgen_emit.objs -I atdgen/src/.atdgen_emit.objs/.private -I /Users/ostera/.opam/4.06.1/lib/atd -I /Users/ostera/.opam/4.06.1/lib/biniou -I /Users/ostera/.opam/4.06.1/lib/easy-format -I /Users/ostera/.opam/4.06.1/lib/yojson -intf-suffix .ml -no-alias-deps -open Atdgen_emit -o atdgen/[...]
# File "atdgen/src/ocaml.ml", line 597, characters 12-24:
# Error: Unbound module Re



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
β”Œβ”€ The following actions failed
β”‚ Ξ» build atdgen 2.0.0
└─
╢─ No changes have been performed
[NOTE] Pinning command successful, but your installed packages may be out of sync.

Let me know if there's any more info you need from me :)

Aaand of course. Immediately after posting I realize I could've used --dev-repo to pin, and that worked. And now the -bs flag works.

Feel free to close πŸ‘