Version française
Home     About     Download     Resources     Contact us    
Browse thread
Dependencies and rebuilding
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jakob Lichtenberg <jakobl@w...>
Subject: Dependencies and rebuilding
If I change the body of functions in a base library, but not the
externally visible signature, I still have to recompile the consumers of
the base library prior to linking the main application.  While this is
not a problem in the trivial case I'll show beneath, it may be a concern
from a componentization and scalability point of view.  Regular C code
does not have this limitation.  This e-mail to request why the design is
as it is?


Example:

===
>type base.ml
let base () = 2+8;;

>ocamlopt -c base.ml

>type consumer.ml
let _ = Printf.printf "Base.base: %d" (Base.base());;

>ocamlopt -c consumer.ml

>ocamlopt base.cmx consumer.cmx -o app.exe

>app.exe
Base.base: 10

>notepad base.ml

>type base.ml
let base () = 2+9;;

>ocamlopt -c base.ml

>ocamlopt base.cmx consumer.cmx -o app.exe
Files consumer.cmx and base.cmx
make inconsistent assumptions over implementation Base

>ocamlopt -c consumer.ml

>ocamlopt base.cmx consumer.cmx -o app.exe

>app.exe
Base.base: 11
===

Thanks,

- Jakob Lichtenberg