On Tuesday, 18 February 2014 at 08:45:16 UTC, Tolga Cakiroglu
(tcak) wrote:
1. Because I am giving the full path of that file to be
imported. But compiler is complaining about that it cannot find
the file. If I remove the path, and leave the file name only,
it works. Am I doing something wrong, or bug?
2. Why do I need to tell compiler where to look at if I am
going to tell where the file is already? Shouldn't it be like
"Hey compiler, if you cannot while the file, look at those
places", and I shouldn't need to use J flag if not necessary?
It is a matter of security I think. By restricting imports to
only explicitly allowed locations and prohibiting fully-qualified
paths dmd guarantees you that compiled program won't access
anything outside of that sandbox. That way compilation process
stays relatively safe.