CHANGES:
Added
Changed
- Paths are normalized to drop the directory prefix ("./" on macOS and Linux)
before pretty printing them (#482, @shonfeder).
Official stable release announcements and updates from the OCaml compiler, OCaml infrastructure and the OCaml Platform Tools.
CHANGES:
CHANGES:
We're happy to announce the release of MDX 2.5.2.
This is a small compatibility release that adjusts MDX's toplevel support to work with OCaml 5.5.
For more details, see the full changelog below.
We're happy to announce the release of mdx 2.5.1, which brings support for OCaml 5.4, as well as improvements to the handling of skipped blocks in .mli/.mld files.
CHANGES:
This release reverts the change introduce in Mdx 2.4.0 that allows the execution of included OCaml code blocks after users reported issues. We will revisit the feature to ensure it is opt-in and doesn't break users setup.
We are happy to announce the release of MDX 2.4.0! This is the first release of MDX to be compatible with OCaml 5.2.
This release also comes with support for executing included OCaml code blocks.
skip to include blocks
to revert to the old behavior (#446, @panglesd, @gpetiot)
Warning: this is a breaking change that is reverted in the next release.We are happy to announce the release of MDX 2.3.1! This is the first release of MDX to be compatible with OCaml 5.1.
We've also vendored the odoc-parser library, eliminating the need to have it
as a dependency. MDX can now be installed independently of the odoc version
you're using.
Add os_type label to enable/disable based on Sys.os_type (#433,
@polytypic)
Make MDX compatible with OCaml 5.1 (#435, @polytypic and @kit-ty-kate)
odoc-parser library, removing the need to have it
as a dependency. (#430, @jonludlam)We're pleased to announce the release of Mdx 2.3.0!
This release comes with support for mld files and changes the parser used
by the toplevel, which allows Camlp5's parser to be used with MDX.
Starting in MDX 2.3.0, you can now execute code blocks in your .mld files! 🎉
As a reminder, .mld files are text files similar to Markdown, but instead of
using the Markdown markup language, they use the Ocamldoc markdown language - as
is used in .mli files. .mld are typically used to write manuals with
odoc.
To run mdx on .mld files, start by enabling mdx in your dune-project:
(using mdx 0.3)
Then list your .mld files in the mdx stanza in your dune:
(mdx
(files index.mld))
Now if you put a code block in index.mld, it will be executed when running dune test and if dune will suggest to promote the output. For instance, if you run dune test with this index.mld:
Here's an example code block in a [.mld] file:
{[
# List.map (fun x -> x * x) [(1 + 9); 2; 3; 4];;
]}
dune test will return:
---+++@@@@ Here's an example code block in a [.mld] file:
{[
# List.map (fun x -> x * x) [(1 + 9); 2; 3; 4];;
+ - : int list = [100; 4; 9; 16]
]}
You can run dune promote to accept the change.
You can see a complete demo of this here.
Now you can keep the code blocks in your manual up-to-date even when your API changes!
mld files (#423, @jonludlam)ref, instead of always the official OCaml parser). This allows
Camlp5's parser to be used with MDX. (#417, @chetmurthy)Normal syntax to Markdown to better explain what the syntax is
and moved it to Mdx.Syntax (#412, @Leonidas-from-XIV)part-end MDX directive in
the output, before that line would've been dropped (#374, #387,
@Leonidas-from-XIV)CHANGES:
--add-opam-provided and --opam-provided to beCHANGES:
--minimal-update flag to lock to generate a lockfilex-opam-monorepo-*lock CLI arguments in x-opam-monorepo-cli-args when generating aCHANGES:
opam-provided packages into pin-depends and duniversemli files.
(#339, #357, @julow, @Leonidas-from-XIV)dune MDX 0.2 stanza by
setting the MDX_RUN_NON_DETERMINISTIC environment variable. (#365,
#366, @Leonidas-from-XIV);; to the output of toplevel phrases that were missing it.
(#346, @Leonidas-from-XIV)mdx binary anymore (#274, @gpetiot)rule command (#312, @gpetiot)require-package label, use the mdx stanza in dune
instead. This label was only used for the rule command and can now be
safely removed. (#363, @Leonidas-from-XIV);; (#342, @Leonidas-from-XIV);; (#342, @Leonidas-from-XIV)dune-gen subcommand that generates testing code for Dune to build
and run with the new mdx stanza. (#305, @voodoos)ocaml, cram, toplevel or include. (#237, @gpetiot)#require directive errors (#276, @gpetiot)--root and --prelude are checked (#292, @gpetiot)create_process instead of execvp to call mdx-test from mdx. This fixes running mdx from dune on Windows (#299, @emillon)<!-- $MDX labels -->, where labels is a list of valid
labels separated by a comma. This line has to immediately precede the block
it is attached to. The legacy syntax is preserved and will be deprecated in a
later release..mli files' doc comments (#206, @jsomers)env_and_file "a:f" associates f to the environment named aenv_and_file " :f" associates f to the default environmentenv_and_file "f" associates f to all environments.mdx-error code block
following the ocaml block instead of crashing the mdx process. Those mdx-error blocks
are recognized and checked by mdx and can be intentionally used to show case specific
compile errors. (#238, @gpetiot)(* $MDX part-... *) delimiters (#250, @gpetiot)set- and unset- labels (#257, @shonfeder)--duniverse-mode to ocaml-mdx rule so that the generated rules work
within a duniversefile label. (#203, #207, @voodoos)--non-deterministic option through the MDX_RUN_NON_DETERMINISTIC
env variables (#208, @NathanReb)--syntax is not set, and add 'markdown' as an alias to 'normal' (#222, @gpetiot)ocaml-mdx deps command to be used by dune to compute file and dir dependencies of an
mdx file. (#217, @voodoos)INSIDE_DUNE when executing shell commands by default (#224, @NathanReb)ocaml-mdx test to crash on some include in toplevel code blocks
(#202, @trefis)direction option, only synchronize from .ml to .md files (#214, @gpetiot)--output/-o option to the test subcommand to allow specifying a different
output file to write the corrected to, or to write it to the standard output (#194, @NathanReb)let* bindings (#190, @gpetiot)--syntax option to rule subcommand to allow generating rules for cram
tests (#177, @craigfe)require-package label to explicitly declare dune package dependencies of a code block
(#149, @Julow)unset- label to unset env variables in shell blocks (#132, @clecat)ocaml-mdx rule using dune format-dune-file (#184, @NathanReb).ml files in generated dune rules (#140, @clecat)test (#176, @Julow)skip label in ocaml-mdx pp (#1561, @CraigFe).ml (#156, @Julow)[@@@parts ...] markers within module definitions (#155, @Julow).ml file when using to-ml direction (#139, @clecat)--force-output to .ml file as well (#137, @clecat).corrected files to be written in some cases (#136, @clecat)4.09.0 (#133, @xclerc)output subcommand as it was very specific to RealWorldOCaml needs (#195, @NathanReb)infer-timestamp direction (#171 @Julow)--force-output option to force generation of diff file (#118 @clecat)version=.., version<=.. and version>=.. keywords to run
a code-block depending on the currently installed OCaml version
(@gpetiot, #87, #90)ppx_tools for toplevel (@avsm, #89)mdx output: escape HTML entities in code blocks (#91, @samoht)mdx rule command to generate dune rules (@gpetiot, #44)mdx output command to generate an HTML document (@samoht, #45)cppo library, just the binary (@samoht, #53)dir=.. labels in ml code blocks (@samoht, #76)mdx rule (@samoht, #81)Initial release