Octachron / codept

Contextual Ocaml DEPendencies Tool: alternative ocaml dependency analyzer
Other
59 stars 10 forks source link

Incremental use of codept? #11

Closed nojb closed 2 years ago

nojb commented 2 years ago

I'm trying to understand how one is supposed to use codept incrementally (ie in a build system).

I looked at the ocamlbuild plugin, and I can see rules defined for generating %.ml.depends from %.ml and so on. Do I understand correctly that this implements "local file analysis" like ocamldep and not "whole project analysis"? What am I missing?

Octachron commented 2 years ago

The ocamlbuild rules handle the project-scale analysis: this is done through the call to build sigs in: https://github.com/Octachron/codept/blob/master/ocamlbuild_plugin/codept_ocamlbuild.ml#L54 . This call build the signature for modules in the over-approximation set of dependencies, which is sufficient to recompute the exact dependencies if there is no false cycle of include in signatures.

nojb commented 2 years ago

Thanks!