I think I would like to change flx caching policy, so here is a request for 
comments!

At present, flx writes *.par and *.cpp files etc etc next to the file being 
compiler.
The executable or shared lib seems to end up in the current directory though ;(

I am having trouble with this during development, even the --force switch isn't
forcing rebuilding the syntax.automaton, std.libtab and *.par files, and the C++
files litter the output.

flx provides --cache_dir= and --output_dir= options to change the default,
but it doesn't work properly: for --cache_dir the directory must exist,
but we still get a failure if the filename is a path.

I would like to change this so that

        $HOME/.felix/cache

is the default. This means that unless otherwise specified, all temporary
output *including the grammar automaton and pre-compiled library* go
into that cache. The filenames used will be an image of the source file names.
In other words for 

        lib/std/posix/fred.flx

the cache name will be

        
$HOME/.felix/cache/usr/local/lib/felix/felix-1.1.7dev/lib/std/posix/fred.par2

The root base is necessary to avoid issues building from different current 
directories.
[What a stupid idea current directories are]

Any directory which doesn't exist will be autocreated.

The idea is that if you're in doubt, you can just blow away the whole cache.
With a single rm command.

Also, this means the Felix library can be installed, text only, in a read only 
directory.
Instead of trying to cache in that directory, during install.

To make this work, the compiler and some tools needs to be modified so they
always open files  with absolute pathnames. A bit tricky. We'll have to rely on
cwd() function to "absolutise" relative filenames.

--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to