You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Listing unnecessary libraries in the (libraries ...) field of executables and libraries is not harmless at the moment due to the way dependencies are computed in Dune: this can cause potentially a lot of unnecessary recompilation, as any change in the "unused" dependency will cause the recompilation of the whole executable/library.
Having some way of knowing if one has included unnecessary libraries in (libraries ...) would thus be quite useful.
The text was updated successfully, but these errors were encountered:
It's rather straightforward to instrument ocamlc/ocamlopt to dump which of the libraries specified on the command-line (when linking an executable) have actually been linked. Or, without patching the compiler, one can replicate the logic with a simple script like:
Note that even if a library is not considered to be needed by the linker, it could still be needed to consider it as dune library dependency to allowing type-checking the code.
Listing unnecessary libraries in the
(libraries ...)
field of executables and libraries is not harmless at the moment due to the way dependencies are computed in Dune: this can cause potentially a lot of unnecessary recompilation, as any change in the "unused" dependency will cause the recompilation of the whole executable/library.Having some way of knowing if one has included unnecessary libraries in
(libraries ...)
would thus be quite useful.The text was updated successfully, but these errors were encountered: