From 6bfbead1b82af50b620fb1caa6612c82bfc2ae7e Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sat, 28 Jan 2023 00:51:31 +0100 Subject: [PATCH 1/6] Bump dub to v1.39 With inheritable dub.selections.json support. --- dub.json | 2 +- dub.selections.json | 2 +- payload/reggae/options.d | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) 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; From e4e0e0a1343ba6ce08e267dc2672bbf1e028e21b Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sat, 30 Nov 2024 19:36:43 +0100 Subject: [PATCH 2/6] Bump dub to latest stable with crucial regression fix --- dub.selections.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dub.selections.json b/dub.selections.json index bda8362d..eadaff67 100644 --- a/dub.selections.json +++ b/dub.selections.json @@ -1,7 +1,10 @@ { "fileVersion": 1, "versions": { - "dub": "1.39.0-beta.1", + "dub": { + "repository": "git+https://github.com/dlang/dub.git", + "version": "ec809a547edbad6252c0ed195efc2f3d87ab11c2" + }, "unit-threaded": "2.2.0" } } From 5d9cc590d0e0cd3d143f433fdfe8f3d13e540d23 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Fri, 28 Feb 2025 02:17:20 +0100 Subject: [PATCH 3/6] Bump dub to latest stable --- dub.selections.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dub.selections.json b/dub.selections.json index eadaff67..20227db5 100644 --- a/dub.selections.json +++ b/dub.selections.json @@ -3,7 +3,7 @@ "versions": { "dub": { "repository": "git+https://github.com/dlang/dub.git", - "version": "ec809a547edbad6252c0ed195efc2f3d87ab11c2" + "version": "4a69bd4b8ec74175cc83f3a0edc1ceb15822377c" }, "unit-threaded": "2.2.0" } From 0bd8240c112e3cd1015b17187ff25051277ff041 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Thu, 6 Mar 2025 11:04:21 +0100 Subject: [PATCH 4/6] Bump dub to v1.39.0 final --- dub.selections.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dub.selections.json b/dub.selections.json index 20227db5..f8e0f665 100644 --- a/dub.selections.json +++ b/dub.selections.json @@ -1,10 +1,7 @@ { "fileVersion": 1, "versions": { - "dub": { - "repository": "git+https://github.com/dlang/dub.git", - "version": "4a69bd4b8ec74175cc83f3a0edc1ceb15822377c" - }, + "dub": "1.39.0", "unit-threaded": "2.2.0" } } From 2df9065fc9083b456bc309e457d622cbd172ec17 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Thu, 6 Mar 2025 11:07:07 +0100 Subject: [PATCH 5/6] CI: Bump dropped macos-12 image to macos-13 And as DMD v2.105.2 isn't compatible with the macos-13 Xcode toolchain, bump it to v2.110.0. --- .github/workflows/d.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 9d834a29..9d7722a8 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -55,10 +55,10 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, macos-12, windows-2022] + os: [ubuntu-22.04, macos-13, windows-2022] dc: + - dmd-2.110.0 - dmd-2.108.0 - - dmd-2.105.2 - ldc-1.37.0 runs-on: ${{ matrix.os }} defaults: From de777ef8446ac98c7bd5a76ca414eb23331d0ed3 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sat, 8 Mar 2025 13:36:26 +0100 Subject: [PATCH 6/6] No more need to undo extra LDC flags formerly added by dub Those were removed in https://github.com/dlang/dub/pull/2690. --- payload/reggae/dub/info.d | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/payload/reggae/dub/info.d b/payload/reggae/dub/info.d index 777e88b2..b1eecf7a 100644 --- a/payload/reggae/dub/info.d +++ b/payload/reggae/dub/info.d @@ -85,23 +85,7 @@ struct DubPackage { } const(string)[] compilerFlags(in string compilerBinName) @safe pure const { - import std.algorithm: among, startsWith; - - const(string)[] pkgDflags = dflags; - if(compilerBinName.among("ldc", "ldc2")) { - if (pkgDflags.length) { - // For LDC, dub implicitly adds `--oq -od=…/obj` to avoid object-file collisions. - // Remove that workaround for reggae; it's not needed and unexpected. - foreach (i; 0 .. pkgDflags.length - 1) { - if (pkgDflags[i] == "--oq" && pkgDflags[i+1].startsWith("-od=")) { - pkgDflags = pkgDflags[0 .. i] ~ pkgDflags[i+2 .. $]; - break; - } - } - } - } - - return pkgDflags; + return dflags; } }