ocaml-ppx / ocaml-migrate-parsetree

DEPRECATED. See https://ocaml.org/changelog/2023-10-23-omp-deprecation. Convert OCaml parsetrees between different major versions
Other
87 stars 43 forks source link

Fix for new odoc #94

Closed jonludlam closed 4 years ago

jonludlam commented 4 years ago

This just renames the module Migrate_parsetree_versions to be Versions. It was already exposed as Migrate_parsetree.Versions, and this is not changed by this PR. The problem was that in the generated alias file (migrate_parsetree__.ml-gen), dune puts in a @canonical tag assuming that the module will be exposed with the same filename - so previously that was:

@canonical Migrate_parsetree.Migrate_parsetree_versions

but since it's actually exposed as Migrate_parsetree.Versions this didn't resolve and odoc couldn't canonicalise references leading to broken links.

Just renaming the module so it matches dune's expectations fixes the problem.

Signed-off-by: Jon Ludlam jon@recoil.org

ghost commented 4 years ago

Hmm, not sure we can merge this right now. omp is still unwrapped, so this PR is effectively introducing a toplevel Versions compilation unit.

Given that it has been the "wrapped transition" mode for a while, i was thinking of releasing a 2.0.0 switching to the wrapped mode.

jonludlam commented 4 years ago

Ah, I hadn't noticed that. An alternative fix is to expose the module Migrate_parsetree_versions in the Migrate_parsetree module - possibly with a deprecation notice there too. Not too important if the 2.0.0 release is close though.

ghost commented 4 years ago

Following #95, the master is now using the normal wrapped mode. So this is fine to merge

ghost commented 4 years ago

Thanks for this PR! BTW, if you'd like to do the same for the other modules such as Migrate_parsetree_driver or Migrate_parsetree_ast_io, that would be welcome too :)