On 01/12/2010, at 2:38 AM, john skaller wrote: > loads it again, and gets duplicate entries. > > If I go back to storing just the argument of the include statement, this will > fix it, but it will mean that it doesn't respond to structural changes, > eg overriding library files by using -I.. perhaps that's right, after all > that's > what is actually causing the problem :)
BTW: the reason for this is, consider someone stupid like me, writing a library file like include "./sibling"; then if someone else says include "std/sibling"; they'd be different paths to the same file and we'd get duplicate entries. The first notation should *never* be used for installed libraries, the second notation should *always* be used for parts of client programs. For tools/webserver the ./file notation is resolved to tools/file Technically, inside flxg, Felix uses two notations: Search ("std/varray") NoSearch ("tools/file") The first variant is used for include "x/y" format. The second is for the main program and resolved subcomponents: these are current directory relative or absolute pathnames (depending on how the file was named on the command line). NoSearch argument has to be resolved relative to the including file, since in a tree, you can use the same ./filename in different parts of the tree. Note that at present the symbol table for the main program is NOT cached. This is because it would be useless: if the cache were needed, then the generated binary would be the same, and flx would run it without ever compiling anything, so the cache would not be used. If something changed, the cache would have to be rebuilt anyhow, so the cache can't be useful (there's actually no option to allow running flxg without generating any C++ files .. something I should add, mainly to allow syntax checking, but also to allow libraries to be built). -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language