Fix #179
This commit is contained in:
parent
8f7f94628c
commit
a9a7038c40
|
|
@ -103,7 +103,7 @@ struct ModuleCache
|
||||||
*/
|
*/
|
||||||
static void addImportPaths(string[] paths)
|
static void addImportPaths(string[] paths)
|
||||||
{
|
{
|
||||||
foreach (path; paths.filter!(a => existanceCheck(a)))
|
foreach (path; paths.filter!(a => existanceCheck(a) && !importPaths[].canFind(a)))
|
||||||
importPaths.insert(path);
|
importPaths.insert(path);
|
||||||
|
|
||||||
foreach (path; importPaths[])
|
foreach (path; importPaths[])
|
||||||
|
|
@ -118,7 +118,10 @@ struct ModuleCache
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO: Implement
|
/// TODO: Implement
|
||||||
static void clear() {}
|
static void clear()
|
||||||
|
{
|
||||||
|
Log.warn("ModuleCache.clear is not yet implemented.");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Params:
|
* Params:
|
||||||
|
|
@ -222,7 +225,7 @@ struct ModuleCache
|
||||||
if (isRooted(moduleName))
|
if (isRooted(moduleName))
|
||||||
return moduleName;
|
return moduleName;
|
||||||
string[] alternatives;
|
string[] alternatives;
|
||||||
foreach (path; importPaths)
|
foreach (path; importPaths[])
|
||||||
{
|
{
|
||||||
string dotDi = buildPath(path, moduleName) ~ ".di";
|
string dotDi = buildPath(path, moduleName) ~ ".di";
|
||||||
string dotD = dotDi[0 .. $ - 1];
|
string dotD = dotDi[0 .. $ - 1];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue