Skip to content

Commit

Permalink
Restore relative output paths for DubPathDependency targets
Browse files Browse the repository at this point in the history
This was recently changed to absolute paths in f1c098d.
  • Loading branch information
kinke committed Apr 15, 2024
1 parent c2d4187 commit 5c91567
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions payload/reggae/rules/dub/external.d
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ private struct DubPathDependency {
// whole path to a target.

return dubBuild(subOptions, dubInfo)
.mapOutputs((string o) => buildNormalizedPath(projectPath,
subOptions.projectPath.relativePath(projectPath),
o));
.mapOutputs((string o) => buildNormalizedPath(
subOptions.projectPath.relativePath(projectPath), o));
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/reggae/reggae.d
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ private string buildReggaefileWithReggae(
import std.stdio: stdout;
buildReggaefileDub(stdout, options, Yes.needDub);

const dubRecipeDir = hiddenDirAbsPath(options);

// FIXME - use correct D compiler.
// The reason it doesn't work now is due to a test using
// a custom compiler
Expand All @@ -453,8 +455,9 @@ private string buildReggaefileWithReggae(
auto newOptions = options.dup;
newOptions.backend = Backend.binary;
newOptions.dubObjsDir = dubObjsDir;
newOptions.projectPath = dubRecipeDir;
newOptions.workingDir = dubRecipeDir;

const dubRecipeDir = hiddenDirAbsPath(options);
auto build = Build(dubPackage(newOptions, DubPath(dubRecipeDir)));

runtimeBuild(newOptions, build);
Expand Down

0 comments on commit 5c91567

Please sign in to comment.