Skip to content

Commit c8fb508

Browse files
authored
Merge pull request #315 from kinke/dub_1.39
Bump dub to v1.39
2 parents 6d46389 + de777ef commit c8fb508

File tree

5 files changed

+18
-22
lines changed

5 files changed

+18
-22
lines changed

.github/workflows/d.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ jobs:
5555
strategy:
5656
fail-fast: false
5757
matrix:
58-
os: [ubuntu-22.04, macos-12, windows-2022]
58+
os: [ubuntu-22.04, macos-13, windows-2022]
5959
dc:
60+
- dmd-2.110.0
6061
- dmd-2.108.0
61-
- dmd-2.105.2
6262
- ldc-1.37.0
6363
runs-on: ${{ matrix.os }}
6464
defaults:

dub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"mainSourceFile": "src/reggae/reggae_main.d",
1414
"preGenerateCommands": ["rdmd $PACKAGE_DIR/list_payload.d $PACKAGE_DIR"],
1515
"dependencies": {
16-
"dub": "~>1.38.0"
16+
"dub": "~>1.39.0"
1717
},
1818
"subConfigurations": {
1919
"dub": "library"

dub.selections.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"fileVersion": 1,
33
"versions": {
4-
"dub": "1.38.0",
4+
"dub": "1.39.0",
55
"unit-threaded": "2.2.0"
66
}
77
}

payload/reggae/dub/info.d

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,7 @@ struct DubPackage {
8585
}
8686

8787
const(string)[] compilerFlags(in string compilerBinName) @safe pure const {
88-
import std.algorithm: among, startsWith;
89-
90-
const(string)[] pkgDflags = dflags;
91-
if(compilerBinName.among("ldc", "ldc2")) {
92-
if (pkgDflags.length) {
93-
// For LDC, dub implicitly adds `--oq -od=…/obj` to avoid object-file collisions.
94-
// Remove that workaround for reggae; it's not needed and unexpected.
95-
foreach (i; 0 .. pkgDflags.length - 1) {
96-
if (pkgDflags[i] == "--oq" && pkgDflags[i+1].startsWith("-od=")) {
97-
pkgDflags = pkgDflags[0 .. i] ~ pkgDflags[i+2 .. $];
98-
break;
99-
}
100-
}
101-
}
102-
}
103-
104-
return pkgDflags;
88+
return dflags;
10589
}
10690
}
10791

payload/reggae/options.d

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,20 @@ struct Options {
242242
maybeDubDeps ~= _dubProjectFile;
243243

244244
const selectionsJsonPath = buildPath(projectPath, "dub.selections.json");
245-
if (selectionsJsonPath.exists)
245+
if (selectionsJsonPath.exists) {
246246
maybeDubDeps ~= selectionsJsonPath;
247+
} else version(Have_dub) {
248+
import dub.packagemanager: PackageManager;
249+
import dub.internal.vibecompat.inet.path: NativePath;
250+
251+
() @trusted {
252+
auto projectRoot = NativePath(projectPath);
253+
auto pm = new PackageManager(projectRoot);
254+
const res = pm.readSelections(projectRoot);
255+
if (!res.isNull())
256+
maybeDubDeps ~= res.get().absolutePath.toNativeString();
257+
}();
258+
}
247259
}
248260

249261
return ranFromPath ~ maybeReggaeFile ~ maybeReggaeFileDeps ~ maybeDubDeps ~ dependencies;

0 commit comments

Comments
 (0)