-
Notifications
You must be signed in to change notification settings - Fork 87
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
Driver #1121
Driver #1121
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impressive! Some basic comments below.
I think it needs formatting as well. We will need to switch to ocamlformat.0.26.2
if we want develop on a 5.2 switch!
src/driver/library.ml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this file is meant to be removed!
src/odoc/classify.ml
Outdated
{ | ||
lib with | ||
modules = StringSet.add cu.cu_name lib.modules; | ||
intf_deps = | ||
List.fold_left | ||
(fun deps (cu, _) -> StringSet.add cu deps) | ||
lib.intf_deps cu.cu_imports; | ||
impl_deps = | ||
List.fold_left | ||
(fun deps id -> StringSet.add (Ident.name id) deps) | ||
lib.impl_deps cu.cu_required_globals; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some compatibility issues with OCaml 5.2
here...
The 5.2 version would be:
{ | |
lib with | |
modules = StringSet.add cu.cu_name lib.modules; | |
intf_deps = | |
List.fold_left | |
(fun deps (cu, _) -> StringSet.add cu deps) | |
lib.intf_deps cu.cu_imports; | |
impl_deps = | |
List.fold_left | |
(fun deps id -> StringSet.add (Ident.name id) deps) | |
lib.impl_deps cu.cu_required_globals; | |
} | |
{ | |
lib with | |
modules = | |
StringSet.add (match cu.cu_name with Compunit s -> s) lib.modules; | |
intf_deps = | |
List.fold_left | |
(fun deps (cu, _) -> StringSet.add cu deps) | |
lib.intf_deps cu.cu_imports; | |
impl_deps = | |
List.fold_left | |
(fun deps id -> StringSet.add id deps) | |
lib.impl_deps | |
(List.map (fun (Compunit s) -> s) cu.cu_required_compunits); | |
} |
This is essentially identical to the code extracted from driver.mld
Essentially renamed compile-src command. These need a bit of polish before we release, but this is enough for the new driver to be testing the interface.
OK, green tick, in it goes. |
This is a new driver for testing the odoc 3.0 implementation. It's based on a combination of our current mld driver and bits of ocaml-doc/voodoo. Also included are some draft changes to the CLI. These will need a bit of polish!
Requires eio for parallelism and therefore OCaml >= 5.1, and should therefore be in a different opam package.
I'm making this PR very early as we'll be collaborating on the driver as we make the odoc 3 implementation changes.