Stream: Coq users

Topic: ✔ meta.yml and mustache


view this post on Zulip Laurent Théry (Jan 20 2022 at 09:56):

I am trying to use meta.ymlfollowing https://github.com/coq-community/templates.
I have installed mustache (version 3.1) and the templates under $TEMPLATES but when I am running
mustache meta.yml $TEMPLATES/README.md.mustache
for the meta.yml from https://github.com/coq-community/gaia
it echoes the file and I am getting an error
Fatal error: exception Ezjsonm.Parse_error(870828711, "JSON.of_buffer illegal number (---)")
What am I doing wrong?

view this post on Zulip Karl Palmskog (Jan 20 2022 at 09:57):

it looks like your mustache program doesn't support the yml fragment we are using. Which mustache are you using? We know the Ruby one or the Go one (available from Nix) works.

view this post on Zulip Laurent Théry (Jan 20 2022 at 09:58):

I did opam install mustache

view this post on Zulip Karl Palmskog (Jan 20 2022 at 09:59):

unfortunately, that mustache isn't YAML compatible:

We suggest you rely on a YAML-compatible mustache implementation such as ruby-mustache (available for instance as an Ubuntu or Debian package) or mustache-go (available as a Nix package).

view this post on Zulip Laurent Théry (Jan 20 2022 at 10:00):

woulld be good to say not to use the one from opam ;-)

view this post on Zulip Karl Palmskog (Jan 20 2022 at 10:01):

OK, I will add to the README. To be honest I didn't know opam install mustache even worked...

view this post on Zulip Karl Palmskog (Jan 20 2022 at 10:09):

done: https://github.com/coq-community/templates#templates-for-coq-projects-in-coq-community-and-elsewhere

view this post on Zulip Laurent Théry (Jan 20 2022 at 10:17):

Perfect. I have installed rubygem-mustache and it works. Thanks @Karl Palmskog

view this post on Zulip Karl Palmskog (Jan 20 2022 at 10:19):

@Laurent Théry just to flag up, I deviated a bit in Gaia from generating all boilerplate automatically using mustache meta.yml .... The meta.yml file has dune: true, but the current README is actually generated with dune: false since Dune is not a strict dependency (make works just as well)

view this post on Zulip Karl Palmskog (Jan 20 2022 at 10:20):

we hope to have things fully automatic in the near future, but the big problem right now is that we can't support monorepos...

view this post on Zulip Notification Bot (Jan 20 2022 at 10:53):

Laurent Théry has marked this topic as resolved.


Last updated: Sep 23 2023 at 14:01 UTC