diff --git a/dub.json b/dub.json index f2025bb9..b62a741b 100644 --- a/dub.json +++ b/dub.json @@ -13,7 +13,7 @@ "mainSourceFile": "src/reggae/reggae_main.d", "preGenerateCommands": ["rdmd $PACKAGE_DIR/list_payload.d $PACKAGE_DIR"], "dependencies": { - "dub": "~>1.38.0" + "dub": "~>1.39.0" }, "subConfigurations": { "dub": "library" diff --git a/dub.selections.json b/dub.selections.json index b1f8b8ba..bda8362d 100644 --- a/dub.selections.json +++ b/dub.selections.json @@ -1,7 +1,7 @@ { "fileVersion": 1, "versions": { - "dub": "1.38.0", + "dub": "1.39.0-beta.1", "unit-threaded": "2.2.0" } } diff --git a/payload/reggae/options.d b/payload/reggae/options.d index 153572ae..8fa614ae 100644 --- a/payload/reggae/options.d +++ b/payload/reggae/options.d @@ -242,8 +242,20 @@ struct Options { maybeDubDeps ~= _dubProjectFile; const selectionsJsonPath = buildPath(projectPath, "dub.selections.json"); - if (selectionsJsonPath.exists) + if (selectionsJsonPath.exists) { maybeDubDeps ~= selectionsJsonPath; + } else version(Have_dub) { + import dub.packagemanager: PackageManager; + import dub.internal.vibecompat.inet.path: NativePath; + + () @trusted { + auto projectRoot = NativePath(projectPath); + auto pm = new PackageManager(projectRoot); + const res = pm.readSelections(projectRoot); + if (!res.isNull()) + maybeDubDeps ~= res.get().absolutePath.toNativeString(); + }(); + } } return ranFromPath ~ maybeReggaeFile ~ maybeReggaeFileDeps ~ maybeDubDeps ~ dependencies;