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

Improve diffing implementation #60

Closed NathanReb closed 4 months ago

NathanReb commented 4 months ago

To diff the set of signatures we need to fold over a pair of maps representing each a version of the interface.

Our current implementation does by folding over both maps sequentially to be able to detect added and modified values in the first pass and removed values in the second pass.

This is not very efficient and folding over both is in fact possible using Map.merge which signature correspond exactly to what we want.

NathanReb commented 4 months ago

CC @Siddhi-agg

Siddhi-agg commented 4 months ago

@NathanReb Commenting to be assigned.