Skip to content

Commit

Permalink
Provide workaround in case the lazy algorithm has bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
atilaneves committed Jun 13, 2024
1 parent 060446a commit 2ea1322
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions payload/reggae/options.d
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct Options {
bool dubTargetPathAbs;
bool buildReggaefileSingle; // single-threaded build using the binary backend
bool buildReggaefileOptimise; // compile the build description with optimisations
bool forceReggaefileDeps;
string[string] userVars; // must be last

Options dup() @safe pure const nothrow scope {
Expand Down Expand Up @@ -334,6 +335,7 @@ Options getOptions(Options defaultOptions, string[] args) @trusted {
"build-reggaefile-with-dub", "Build the reggaefile with dub instead of the binary backend", &options.buildReggaefileWithDub,
"build-reggaefile-single", "Build the reggaefile using a single thread", &options.buildReggaefileSingle,
"build-reggaefile-release", "Build the reggaefile with optimisations", &options.buildReggaefileOptimise,
"force-reggaefile-deps", "Force calculating reggaefile import dependencies", &options.forceReggaefileDeps,
);

if(helpInfo.helpWanted) {
Expand Down
2 changes: 1 addition & 1 deletion src/reggae/reggae.d
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ private void calculateReggaeFileDeps(O)(auto ref O output, in Options options) {
import std.path: dirName;

// No imports => no dependencies => no need to spend time calculating.
if(noExternalImports(options)) {
if(!options.forceReggaefileDeps && noExternalImports(options)) {
if(!options.reggaeFileDepFile.dirName.exists)
mkdirRecurse(options.reggaeFileDepFile.dirName);
write(options.reggaeFileDepFile, "reggaefile.o: \\\n " ~ options.reggaeFilePath);
Expand Down

0 comments on commit 2ea1322

Please sign in to comment.