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] mdx (1.5.0) #15415

Merged
merged 4 commits into from
Dec 2, 2019
Merged

Conversation

NathanReb
Copy link
Contributor

Executable code blocks inside markdown files

CHANGES:

Added

Changed

Fixed

Removed

CHANGES:

#### Added

- Add a `--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 (realworldocaml/mdx#194, @NathanReb)
- Migrate to OCaml 4.08 AST to add support for `let*` bindings (realworldocaml/mdx#190, @gpetiot)
- Add `--syntax` option to `rule` subcommand to allow generating rules for cram
  tests (realworldocaml/mdx#177, @craigfe)
- Add a `require-package` label to explicitly declare dune `package` dependencies of a code block
  (realworldocaml/mdx#149, @Julow)
- Add an `unset-` label to unset env variables in shell blocks (realworldocaml/mdx#132, @clecat)

#### Changed

- Format rules generated by `ocaml-mdx rule` using `dune format-dune-file` (realworldocaml/mdx#184, @NathanReb)
- Run promotion of markdown files before `.ml` files in generated dune rules (realworldocaml/mdx#140, @clecat)

#### Fixed

- Use module_presence information on Env.summary to prevent fetching absent modules from the
  toplevel env (realworldocaml/mdx#186, @clecat)
- Remove trailing whitespaces at the end of toplevel or bash evaluation lines
  (realworldocaml/mdx#166, @clecat)
- Improve error reporting of ocaml-mdx test (realworldocaml/mdx#172, @Julow)
- Rule: Pass the --section option to `test` (realworldocaml/mdx#176, @Julow)
- Remove trailing whitespaces from shell outputs and toplevel evals (realworldocaml/mdx#166, @clecat)
- Remove inappropriate empty lines in generated dune rules (realworldocaml/mdx#163, @Julow)
- Fix ignored `skip` label in `ocaml-mdx pp` (realworldocaml/mdx#1561, @craigfe)
- Fix synchronization of new parts from markdown to `.ml` (realworldocaml/mdx#156, @Julow)
- Fix ignored `[@@@Parts ...]` markers within module definitions (realworldocaml/mdx#155, @Julow)
- Fix a bug in internal OCaml version comparison that lead to crashes in some cases (realworldocaml/mdx#145, @gpetiot)
- Promote to empty `.ml` file when using `to-ml` direction (realworldocaml/mdx#139, @clecat)
- Apply `--force-output` to `.ml` file as well (realworldocaml/mdx#137, @clecat)
- Fix a bug preventing `.corrected` files to be written in some cases (realworldocaml/mdx#136, @clecat)
- Add compatibility with `4.09.0` (realworldocaml/mdx#133, @xclerc)

#### Removed

- Remove the `output` subcommand as it was very specific to RealWorldOCaml needs (realworldocaml/mdx#195, @NathanReb)
- Remove the `infer-timestamp` direction (realworldocaml/mdx#171 @Julow)
@NathanReb
Copy link
Contributor Author

We did quite some work on the tests so hopefully it should pass the CI builds this time. 🤞

@NathanReb
Copy link
Contributor Author

I'm looking into the rev deps failures. Some of them are kind of expected and come from bug fixes in mdx such as the one in containers which is triggered by the stripping of trailing whitespaces in he output of the toplevel.

@NathanReb
Copy link
Contributor Author

The failure in conv-ppx seems to be a bug we introduced.

@NathanReb
Copy link
Contributor Author

The msat failure seems unrelated but I might be missing something.

The routes one comes from a breaking change we tried to squeeze in the release as we thought nodody was using that feature so I'll update its constraints.

@kit-ty-kate
Copy link
Member

Can the rest of the revdeps failure be take care of if I restrict the version of mdx used to 1.4.0 for instance? If yes I'll create a PR for it

@NathanReb
Copy link
Contributor Author

I'll give a go at fixing the other failures, if it's too much work I'll update the other revdeps myself and will ping you then. Does that sound good to you?

@NathanReb
Copy link
Contributor Author

NathanReb commented Dec 2, 2019

Ok so I took a deeper look at this and the failure in cconv-ppx isn't a bug but is tied to a type alias change somewhere in cconv and it seems to be unrelated to the version of mdx.

I'll update the other packages dependencies to fix the issues with whitespaces and will notify package maintainers about this change!

@NathanReb
Copy link
Contributor Author

To sum up:

  • I added upper bounds on mdx for packages which tests break because of the whitespace changes, i.e. containers version 2.6 and 2.6.1
  • I did the same for routes which was using a feature we removed in this version, also fixed upstream: Improve mdx test rule anuragsoni/routes#73
  • msat and cconv-ppx failures seem unrelated to mdx to me

@kit-ty-kate let me know if that works for you!

@kit-ty-kate
Copy link
Member

Last comment (sorry I didn't see that sooner) and I think this PR is good to go.

Co-Authored-By: Kate <kit.ty.kate@disroot.org>
@kit-ty-kate
Copy link
Member

Thanks a lot!

@kit-ty-kate kit-ty-kate merged commit 81c632f into ocaml:master Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants