How does the compiler look for the files of imports?

kris foo at bar.com
Wed Sep 19 20:28:09 PDT 2007


Jarrett Billingsley wrote:
> "BCS" <ao at pathlink.com> wrote in message 
> news:ce0a3343236848c9c8a90d5226c2 at news.digitalmars.com...
>> What I'm thinking of is; start with the given file, if you can't find the 
>> imports and they share a common package prefix, check if the containing 
>> directory has your package as a suffix. If it does try removing the sufix 
>> and then check for the modules. For consistency, If you can't find /all/ 
>> imports using this new root in replacement of the current directly, then 
>> fail
> 
> So, you want the compiler to check the current directory and one directory 
> up.  Why not arbitrarily high up in the directory hierarchy?  It seems like 
> you want the compiler to solve this one problem, which is not so much a 
> problem as it is a misunderstanding of the correct behavior.
> 
> Just compile from the correct directory, use -I, or use a build tool.  It's 
> not like there aren't simple solutions already. 

Exactly :p

use two or more -I options, if you have a weird kinda' install



More information about the Digitalmars-d mailing list