[Grace-core] Path Support

Jameson McCowan mjameson at cs.pdx.edu
Wed Sep 11 16:26:42 PDT 2013


I've written some code that changes how the minigrace handles imports to 
allow importing of files in the same directory as the one being 
compiled, even if it's not the current working directory.

The import checking order should now be to as follows:
     check if the module is already imported
     check if the module exists in the same directory as the compiler
     check if the module exists in the current working directory
     check if the module exists in the directory of the compilation target

I've done some testing and it seems to work, but I'm still worried about 
there being some other issues. For instance, there was an error that has 
since been fixed where a file compiled fine but would fail to recompile.

The changes I've made should only be present in genc.grace and can be 
found here:
https://github.com/apblack/minigrace


More information about the Grace-core mailing list