ocaml-semver / ocaml-api-watch

Libraries and tools to keep watch on you OCaml lib's API changes
ISC License
21 stars 15 forks source link

Support unwrapped libraries #71

Open NathanReb opened 3 months ago

NathanReb commented 3 months ago

Once #70 has been fixed we should think about adding support for unwrapped libraries, i.e. libraries that don't have a single entry module.

NchamJosephMuam commented 2 weeks ago

Given that #70 is closed already, what is needed to work on this issue? @NathanReb @panglesd

NathanReb commented 1 week ago

Unwrapped libraries don't have a main module but have all there modules available in the "root namespace".

To handle unwrapped libraries I think we need the following:

  1. Add a Library.load_unwrapped function that properly loads an unwrapped lib, returning something like a map from module name to signature.
  2. Make Library.load match that type
  3. Add something like Diff.library that diffs the whole map
  4. Adapt api-diff by adding an --unwrapped flag and make it use the above functions accordingly

This is quite a complex issue to tackle but I'm happy to guide you through it if you're willing to invest the time.

NchamJosephMuam commented 1 week ago

I will be happy to work on it with your guidance