[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#559447: gnat-4.4: extends keyword in project files seems to be broken



I wrote:
> library project "extends" library project: ERROR (3)
[...]
> (3) the extension replaces the parent, i.e. it should copy the parent's
> ALI files into its own Library_ALI_Dir and link the parent's object
> files into the library itself, which defeats the purpose of the parent
> library; better merge the two projects into a single one.

Thinking more about this I now see some value to the concept of a library
project extensing another; the semantics should be:

(3) the extension replaces the parent, i.e. it recompiles all of the
sources of the parent and of the extension into a new library.  The
extension may hide some parent sources with its own copy.

This implies that the Library_Dir, Library_Name and Library_ALI_Dir in
the parent become irrelevant; the extension must define its own, with
different values.  This is impossible with "extends all" because
"extends all" silently creates such an extension but does not allow
defining new values for the attributes.

This reinforces my feeling that "extends" as opposed to "extends all"
should fix the problem.

-- 
Ludovic Brenta.




Reply to: