Modules
rikki cattermole via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jul 23 19:45:57 PDT 2016
On 24/07/2016 2:28 PM, Rufus Smith wrote:
> NM, ignore. Seems it was something else going on. Although, if you know
> how how dmd resolves this stuff exactly, it would be nice to know. Does
> it just use the module names regardless of path or does the path where
> the module is located have any play(assuming they are properly passed to
> the compiler).
My understanding is this:
1. For each file passed, use supplied module name
2. If an import is unknown look at each of the directories passed via -I
and find it based upon a/b/c.d for module a.b.c;
3. For each file passed, if an import is unknown try to guess based upon
paths
Of course rdmd adds another level of behavior on top and is mostly based
upon the third one.
If in doubt, try using dub. It can show you all this without looking at
code ;)
More information about the Digitalmars-d-learn
mailing list