Skip to content

Commit

Permalink
Fix project loading
Browse files Browse the repository at this point in the history
  • Loading branch information
shoo committed Aug 26, 2019
1 parent 45c278e commit 443d174
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/gendoc/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ struct PackageConfig
dub.loadPackage(pkg);
scope (exit) if (pkg)
dub.loadPackage(bkupPkg);
dub.project.reinit();
if (!dub.project.hasAllDependencies)
dub.upgrade(UpgradeOptions.select);

Expand Down Expand Up @@ -78,7 +77,8 @@ struct PackageConfig
PackageConfig pkgcfg;
if (spkg.recipe.name.length > 0)
{
auto subpkg = dub.packageManager.getSubPackage(dub.project.rootPackage, spkg.recipe.name, false);
auto basepkg = dub.packageManager.getPackage(name, packageVersion);
auto subpkg = dub.packageManager.getSubPackage(basepkg, spkg.recipe.name, false);
pkgcfg.loadPackage(dub, subpkg,
archType, buildType, configName, compiler);
}
Expand All @@ -92,6 +92,7 @@ struct PackageConfig
subPackages ~= pkgcfg;
}
}

/// ditto
void loadPackage(
string dir,
Expand All @@ -108,7 +109,6 @@ struct PackageConfig
compiler = dub.defaultCompiler;
if (archType.length == 0)
archType = dub.defaultArchitecture;
auto tmppkg = dub.packageManager.getOrLoadPackage(NativePath(absDir), NativePath.init, true);
dub.loadPackage();
loadPackage(dub, null,
archType,
Expand Down

0 comments on commit 443d174

Please sign in to comment.