Add a command that generates test code#305
Conversation
gpetiot
left a comment
There was a problem hiding this comment.
It looks good to me, thanks! I only had a look at this part and not the full dune integration
gpetiot
left a comment
There was a problem hiding this comment.
Looks good to me, thanks!
|
@gpetiot I just realised that I changed the interface of b1a229c#diff-5da8e8cd516e18aa55b7f95da3437cee754d51f6d9bdf3439fca45fa3b6b67baL33-R33 Is that ok ? |
|
It looks fine to me, not sure many people use mdx as a library anyway, I will let @NathanReb merge in case he doesn't agree |
NathanReb
left a comment
There was a problem hiding this comment.
It all looks good to me! Have you had a chance to test it with your dune patch, I'm guessing it all works fine but I'd rather be sure before merging!
I just realised that I changed the interface of Mdx_test
It's fine, nobody should be using it anyway. The only consumer of the library atm is RWO and I don't think it uses this part of the API at all anyway. In the future we'll probably migrate RWO's code to use OMD instead as it mostly relies on MDX for markdown parsing and to generate the right html.
Yes I did ! |
|
Awesome possum! Let's merge! |
CHANGES: #### Added - Add a new `dune-gen` subcommand that generates testing code for Dune to build and run with the new `mdx` stanza. (realworldocaml/mdx#305, @voodoos)
This PR is part of the implementation of the new Dune's
mdxstanza.The design document can be found here.
The corresponding Dune's PR is here.
This is a rough first attempt to generate a test executable, but it already works for most cases.
The main missing feature is the ability to pass a list of directories containing
cm*files to the generator.I made a subcommand for now, but a separate binary might be a better choice ?