4.2.3 Order of Compilation Issues
If, in our earlier example, there was a spec for the
procedure, it would be contained in the file
hello.ads; yet this
file would not have to be explicitly compiled. This is the result of the
model we chose to implement library management. Some of the consequences
of this model are as follows:
- * There is no point in compiling specs (except for package
specs with no bodies) because these are compiled as needed by clients. If
you attempt a useless compilation, you will receive an error message.
It is also useless to compile subunits because they are compiled as needed
by the parent.
- * There are no order of compilation requirements: performing a
compilation never obsoletes anything. The only way you can obsolete
something and require recompilations is to modify one of the
source files on which it depends.
- * There is no library as such, apart from the ALI files
(The Ada Library Information Files, for information on the format
of these files). For now we find it convenient to create separate ALI files,
but eventually the information therein may be incorporated into the object
- * When you compile a unit, the source files for the specs of all units
that it `with's, all its subunits, and the bodies of any generics it
instantiates must be available (reachable by the search-paths mechanism
described above), or you will receive a fatal error message.