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

Driver #1121

Merged
merged 13 commits into from
May 21, 2024
Merged

Driver #1121

merged 13 commits into from
May 21, 2024

Conversation

jonludlam
Copy link
Member

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.

Copy link
Collaborator

@panglesd panglesd left a 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!

Copy link
Collaborator

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!

Comment on lines 42 to 53
{
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;
}
Copy link
Collaborator

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:

Suggested change
{
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.
@jonludlam
Copy link
Member Author

OK, green tick, in it goes.

@jonludlam jonludlam merged commit 83ad92f into ocaml:master May 21, 2024
13 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants