Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release with 5.1 compatibility #438

Open
mseri opened this issue Sep 25, 2023 · 9 comments
Open

New release with 5.1 compatibility #438

mseri opened this issue Sep 25, 2023 · 9 comments

Comments

@mseri
Copy link

mseri commented Sep 25, 2023

Would it be possible to have a release of mdx with #435 ?
This would re-enable testing for a number of packages that where otherwise failing (and now are not tested due to newly introced upper bounds, see ocaml/opam-repository#24467)

@polytypic
Copy link
Contributor

Currently mdx depends on the compiler internals and, as it is, mdx will also require updates to work with OCaml 5.2, so this problem is going to repeat soon.

I would personally recommend to

  • simplify / drop features from mdx to make it mostly independent of the compiler internals, and

  • stop using mdx as a critical testing tool and only use it to optionally check documentation.

@mseri
Copy link
Author

mseri commented Sep 26, 2023

Thanks for the comment. Ping @talex5

@mseri
Copy link
Author

mseri commented Sep 26, 2023

I support your first point. I think for the latter is too late, since many projects are now using mdx to use the documentation also as a testing tool

@polytypic
Copy link
Contributor

The mdx tool, as it is, requires constant maintenance to keep up with the compiler internals and mdx is not, to my knowledge, currently actively maintained. Perhaps this changes in the future, but for now I personally do not recommend using mdx as a testing tool.

As long as software is being maintained, it should not be too late to rewrite tests to use less fragile and maintenance heavy approaches.

@tmattio
Copy link
Collaborator

tmattio commented Sep 27, 2023

PR on opam-repository is at ocaml/opam-repository#24535

@tmattio
Copy link
Collaborator

tmattio commented Sep 27, 2023

To comment on

stop using mdx as a critical testing tool and only use it to optionally check documentation.

Now that Dune supports cram test and that cram test support has been removed from mdx, the tool's primary purpose is indeed to run code blocks in documentation, and not to be a test runner.

I've been curious about that: is there anything blocking Eio from using Dune cram tests in place of mdx?

@talex5
Copy link
Contributor

talex5 commented Sep 28, 2023

Eio will always have documentation, so it always needs to depend on a doc tester like mdx. So having a second testing system doesn't make things any more reliable, and cram tests look less convenient that mdx. What's the benefit?

@tmcgilchrist
Copy link
Contributor

To comment on

stop using mdx as a critical testing tool and only use it to optionally check documentation.

Now that Dune supports cram test and that cram test support has been removed from mdx, the tool's primary purpose is indeed to run code blocks in documentation, and not to be a test runner.

What is confusing in my opinion is craml is marked as deprecated and I'm directed to use mdx instead. The cram tests documentation for dune doesn't mention any deprecation, I can only assume because it uses something else? But it's not clear whether it is.

I can create the equivalent documentation tests in mdx and they work the same as the dune cram tests.

So which supported option should I use to test cli ocaml programs?

@KFoxder
Copy link

KFoxder commented Mar 7, 2024

@tmcgilchrist As someone who is new and just finally stumbled to this issue and comment. I agree. I was quite confused and thought I should be using mdx only to find out that craml is not deprecated and is in fact part of dune

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants