|Newbie questions about Pliant
Recompiling only changed files
How can a setup a system where if I change one out of
many .pli files, only that one is recomplied, and the rest
are not recompiled, and their previous compiled version is used ?
|Message posted by maybe Boris Reitman on 2004/10/21 18:19:38
|I have a slow computer and it takes a long time to compile my program.
Usually I edit only one .pli file and then I want to run the program and
see what it does. When programming in C, in a .o based system, using Makefile,
only the changed .c files are recompiled into .o files, and the linking is fast.
I thought that the Pliant's auto compiling feature (the 'precompile' commandline
argument) will do all this for me. If I change one of the .pli files, somehow
the the existing .dump file is modified to reflect the changes. I have observed
that this is not the case, I have to delete the .dump file for changes to take effect,
and all the code is recompiled.
What is the proper way to update the final .dump file so that application
starts fast and the recompiling is at a minimum ? Should I not have a final dump file,
and instead keep a .dump file per each .pli file that is bound to change,
and have a long list of 'precompile' arguments ? Maybe someone already has
a sample Makefile that orchestrates such thing.
|Message posted by hubert.tonneau on 2004/10/26 10:53:56
|Precompiling is a complex issue.
Basically, the program has to be written so that Pliant can stop and properly
restart it. There are some limits to Pliant ability to do so. Some modules
need helpers, so work only if helpers are properly written.
In very fiew words, the biggest constrain is that Pliant will not be abble to
write a usable .dump file if it already has started new threads.
If I do development on a program that is long to start because has much code
to compile, I will try to build a special .dump with most the libraries that
are stable. Here is an example:
pliant 'precompile /binary/rip.dump module /pliant/install/minimal.pli module /pliant/graphic/image/rip.pli module /pliant/graphic/filter/io.pli' module /pliant/graphic/sample/rip.pli command 'rip "file:/tmp/charte.ps" "file:/tmp/charte.png" "resolution 150 trace"'