Hi Chris, thanks for your comment. The problem I am trying to solve is the 
following (occurring on Lion).

If Zorba is not installed ("make install" not executed) the tests (run from the 
build directory) pass, since the LIB_PATH taken into consideration is the third 
builtin path (the one in the build directory) - the first two builtin paths 
(both in the install dir) being nonexistent. The libraries in the build 
directory's LIB_PATH point back to the zorba libraries in the build directory, 
so everything is consistent.

If Zorba is installed ("make install" executed) many of the tests (run from the 
build directory) no longer pass, since the first two builtin paths (in the 
install directory) now exist and take over. One issue is that they do not point 
back to the zorba library in the build directory, but to the zorba library in 
the install directory. This means that two identical, albeit physically 
different zorba libraries are actually used side-by-side (the one in the build 
directory, the one in the install directory), so that two stores are 
instantiated, leading to a failing assertion (store2 == store).

In projects that build in top of zorba and that need "make install" for running 
their tests, a manual post-install dependency override is required to get all 
tests to pass.

Having the command-line --module-path take precedence over builtin paths would 
make sure that tests can specify their LIB_PATH.

I do understand the concern you raise, i.e., it might not be wise to allow this 
lib path override in real life usage. Would this make sense: have two lib path 
vectors in each static context node, one used before that of the parent, one 
used after the parent - it means that the lookup would be 
bottom-up-and-back-down. The former lib path (which takes priority over the 
builtin paths) could be only exposed to tests, and the latter one could be the 
one exposed officially. Would it make sense to you?

Your team Zorba Coders is subscribed to branch lp:zorba.

Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to