Skip to content

Commit

Permalink
Merge pull request atilaneves#115 from kinke/dub
Browse files Browse the repository at this point in the history
Bump dub dependency to v1.23.0
  • Loading branch information
atilaneves authored Dec 15, 2020
2 parents 5395a01 + f2d89f4 commit f8042a9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"excludedSourceFiles": ["payload/reggae/buildgen_main.d", "payload/reggae/dcompile.d"],
"mainSourceFile": "src/reggae/reggae_main.d",
"dependencies": {
"dub": "~>1.14.0"
"dub": "~>1.23.0"
},
"configurations": [
{ "name": "executable" },
Expand Down
2 changes: 1 addition & 1 deletion dub.selections.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileVersion": 1,
"versions": {
"dub": "1.14.0",
"dub": "1.23.0",
"unit-threaded": "0.10.8"
}
}
9 changes: 7 additions & 2 deletions src/reggae/dub/interop/dublib.d
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,16 @@ auto packageManager(in ProjectPath projectPath,
import dub.internal.vibecompat.inet.path: NativePath;
import dub.packagemanager: PackageManager;

const packagePath = NativePath(projectPath.value);
const userPath = NativePath(userPackagesPath.value);
const systemPath = NativePath(systemPackagesPath.value);
const refreshPackages = false;

auto pkgManager = new PackageManager(userPath, systemPath, refreshPackages);
auto pkgManager = new PackageManager(packagePath, userPath, systemPath, refreshPackages);
// In dub proper, this initialisation is done in commandline.d
// in the function runDubCommandLine. If not not, subpackages
// won't work.
pkgManager.getOrLoadPackage(NativePath(projectPath.value));
pkgManager.getOrLoadPackage(packagePath);

return pkgManager;
}
Expand Down Expand Up @@ -338,11 +339,15 @@ class InfoGenerator: ProjectGenerator {
override void generateTargets(GeneratorSettings settings, in TargetInfo[string] targets) @trusted {

import dub.compilers.buildsettings: BuildSetting;
import dub.platform: determineBuildPlatform;

auto platform = determineBuildPlatform();

DubPackage nameToDubPackage(in string targetName, in bool isFirstPackage = false) {
const targetInfo = targets[targetName];
auto newBuildSettings = targetInfo.buildSettings.dup;
settings.compiler.prepareBuildSettings(newBuildSettings,
platform,
BuildSetting.noOptions /*???*/);
DubPackage pkg;

Expand Down

0 comments on commit f8042a9

Please sign in to comment.