File tree Expand file tree Collapse file tree 5 files changed +18
-22
lines changed
Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 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"
Original file line number Diff line number Diff line change 11{
22 "fileVersion" : 1 ,
33 "versions" : {
4- "dub" : " 1.38 .0" ,
4+ "dub" : " 1.39 .0" ,
55 "unit-threaded" : " 2.2.0"
66 }
77}
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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;
You can’t perform that action at this time.
0 commit comments