Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocaml and large development projects
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Carr <jfc@M...>
Subject: Re: [Caml-list] ocaml and large development projects

> Don't people consider separate compilation and the ability to change 
> implementation without complete project recompiles a fundamental 
> requirement of non-toy languages?

Ten or fifteen years ago (when building a large project took a day of
compile time, and building the complete OS took several days) I would
have answered "yes".

Now it is an important feature but not an essential feature.


> If this can't be fixed, there needs to be a way to disable cross-file 
> inlining so that it can be worked around (and the checksums should reflect 
> this, and ocamldep should do the right thing, etc.), and then when you want 
> to "globally optimize" you can recompile the world.

At least two possibilities come to mind:

1. An inining threshold that affects generation of .cmx files instead
of their use.  -gen-inline 0 means don't generate any inlining information,
-gen-inline 1 means put small functions in the .cmx file, etc.

2. Only put functions defined in the .mli file in the .cmx file

Either way you have to avoid letting regeneration of an identical
.cmx file trigger a rebuild of the whole project.  Two solutions:

1. Make ocamlopt leave an existing .cmx file if the new contents
would be identical.

2. Use scons, a python-based make replacement that uses file contents
instead of modification time.  It is designed for large projects.
I'll have to try it out with ocaml some day.  The startup cost is
high because it works not at all like make.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners