Converting my libraries to Void Safe raised questions

4 messages Options
Embed this post
Permalink
Jimmy Johnson

Converting my libraries to Void Safe raised questions

Reply Threaded More More options
Print post
Permalink
Can I use base-safe.ecf for projects that are not yet converted to void safe?

Reason:  I have libraries that depend on each other and they in turn depend on base.  If I start changing one, it breaks the other because the library being updated to void-safe uses base-safe.ecf and the other still uses base.ecf; this gives an error where two libraries have the same UUID.  I read somewhere that you can incrementally update.  So...?

If the answer is "yes", why have two ecf files?

Jimmy J. Johnson

Emmanuel Stapf

RE: Converting my libraries to Void Safe raised questions

Reply Threaded More More options
Print post
Permalink
> Can I use base-safe.ecf for projects that are not yet converted to void
> safe?

Yes, but all the libraries included in your projects must use `base-safe.ecf' and
this is why we provide 2 configuration files for all our libraries (A void-safe
version of the ECF and a non-void safe one).

If you were to mix libraries using in some case the void-safe version and in some
other cases the non-void-safe version, then the compiler will have to choose a
default for you and this is why you are getting the warning because the default
choice is random and you won't know without a close inspection whether your code
is using void-safe EiffelBase or not.

Regards,
Manu

------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
Jimmy Johnson

Re: Converting my libraries to Void Safe raised questions

Reply Threaded More More options
Print post
Permalink
Okay, but aren't both versions using the same source files?  Why then provide two .ecf files.  Why not use the base-safe version for all?



--- In [hidden email], "Emmanuel Stapf [ES]" <manus@...> wrote:

>
> > Can I use base-safe.ecf for projects that are not yet converted to void
> > safe?
>
> Yes, but all the libraries included in your projects must use `base-safe.ecf' and
> this is why we provide 2 configuration files for all our libraries (A void-safe
> version of the ECF and a non-void safe one).
>
> If you were to mix libraries using in some case the void-safe version and in some
> other cases the non-void-safe version, then the compiler will have to choose a
> default for you and this is why you are getting the warning because the default
> choice is random and you won't know without a close inspection whether your code
> is using void-safe EiffelBase or not.
>
> Regards,
> Manu
>


Emmanuel Stapf

RE: Re: Converting my libraries to Void Safe raised questions

Reply Threaded More More options
Print post
Permalink
> Okay, but aren't both versions using the same source files?  Why then
> provide two .ecf files.  Why not use the base-safe version for all?

Because the options are different. For example using base-safe in a non-void-safe
project could be problematic for redefinition. Indeed an attached argument cannot
be redefined into a detachable one (which is the default for non-void-safe code).

Basically what we have found is that compiling all your code with the same set of
options (being void-safe or non-void-safe) is easy to manage for users (modulo the
work required to make the code void-safe). However mixing both is actually not
easy to manage especially using inheritance from a non-void-safe class in a
void-safe class or vice-versa. This is why we offer 2 ECFs for our libraries (even
if it is the same source code), it makes it clear in which way you compile your
code.

Hope this helps,
Manu


------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------