coq-community / templates

Templates for configuration files and scripts useful for maintaining Coq projects [maintainers=@palmskog,@Zimmi48]
The Unlicense
13 stars 8 forks source link

The documentation should point to working `mustache` reference implementation for (at least) the major OS. #85

Open strub opened 3 years ago

strub commented 3 years ago

Hi,

Currently, it is not clear how to get a workable mustache implementation under MacOS. The mustache packaged in opam does not accept YAML as input. I tried gem install mustache which does not seem to install a binary (only a ruby package) - (I could certainly wrap a simply ruby script, but that not scalable). I tried go get github.com/hoisie/mustache which... does not seem to install binary (only a Go package). I am bailing out. Maybe I overlooked something?

Zimmi48 commented 3 years ago

Does brew install mstch work? (I didn't try it and its README is not clear on whether it supports YAML). Otherwise, it seems that the JS implementation available on npm (https://www.npmjs.com/package/mustache) includes a CLI tool. This should be pretty much universal...

strub commented 3 years ago

So, I managed to find the mustache binary installed by gem install mustache- (I am not versed in the ruby environment, the binary was not accessible via $PATH by default). Answering your previous question, brew install mstch (that is not listed by brew search mustache) installed a C++ library, but not a CLI front-end, as shown by brew ls --verbose mstch:

/usr/local/Cellar/mstch/1.0.2/INSTALL_RECEIPT.json
/usr/local/Cellar/mstch/1.0.2/LICENSE
/usr/local/Cellar/mstch/1.0.2/.brew/mstch.rb
/usr/local/Cellar/mstch/1.0.2/include/mstch/mstch.hpp
/usr/local/Cellar/mstch/1.0.2/README.md
/usr/local/Cellar/mstch/1.0.2/lib/pkgconfig/mstch.pc
/usr/local/Cellar/mstch/1.0.2/lib/cmake/mstch/mstch-config.cmake
/usr/local/Cellar/mstch/1.0.2/lib/cmake/mstch/mstch-targets-release.cmake
/usr/local/Cellar/mstch/1.0.2/lib/cmake/mstch/mstch-targets.cmake
/usr/local/Cellar/mstch/1.0.2/lib/cmake/mstch/mstch-config-version.cmake
/usr/local/Cellar/mstch/1.0.2/lib/libmstch.a

Requiring users to install npm seems a bit overkill to me. But in all cases, the README of this repository should give pointers to working implementations.

PS: I am planning to add a YAML front-end to the OCaml version. I will ping this ticket when done.

anton-trunov commented 3 years ago

I am planning to add a YAML front-end to the OCaml version. I will ping this ticket when done.

That would be great! Here is the relevant issue: https://github.com/rgrinberg/ocaml-mustache/issues/40

strub commented 3 years ago

I am planning to add a YAML front-end to the OCaml version. I will ping this ticket when done.

That would be great! Here is the relevant issue: rgrinberg/ocaml-mustache#40

See rgrinberg/ocaml-mustache#45. Note that this is still not sufficient to parse/interpret all the templates of this repository. But I am working on this.

ybertot commented 2 years ago

I would like to add that on a fedora distribution of linux, I did not have mustache by default, a "dnf search mustache" showed "rubygem-ustache.noarch", which I inferred to be the closest to ruby-mustache, as prescribed by the README file. I don't find this foolproof enough. Any opinion?