Skip to content

Commit

Permalink
Printing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
atilaneves committed May 27, 2024
1 parent b310457 commit e1b2e81
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src/reggae/reggae.d
Original file line number Diff line number Diff line change
Expand Up @@ -486,17 +486,24 @@ private void buildBinary(T)(auto ref T output, in Options options, in Binary bin
: "";
output.log("Compiling metabuild binary ", bin.name, extraInfo);

string stuff;
{
import std.file;
import std.stdio;
stuff = dirEntries(reggaeSrcDirName(options), SpanMode.depth).text;
}

// std.process.execute has a bug where using workDir and a relative path
// don't work (https://issues.dlang.org/show_bug.cgi?id=15915)
// so executeShell is used instead
immutable res = executeShell(bin.cmd.join(" "), env, config, maxOutput, workDir);

if(res.status != 0) {
import std.file;
import std.stdio;
import std.string;
import core.stdc.stdio: printf;
printf((dirEntries(reggaeSrcDirName(options), SpanMode.depth).text ~ "\n").toStringz);
printf("\n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
printf((stuff ~ "\n").toStringz);
printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
}

enforce(
Expand Down
2 changes: 1 addition & 1 deletion tests/it/runtime/dub/proper.d
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ version(DigitalMars) {
extern(C) int lebaz() { return 42; }
});

["dmd", "-c", "baz.d"].shouldExecuteOk;
["dmd", "-c", inSandboxPath("baz.d")].shouldExecuteOk;

const output = runReggae("-b", "ninja", "--dub-objs-dir=" ~ testPath);
writelnUt(output);
Expand Down

0 comments on commit e1b2e81

Please sign in to comment.