Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rdmd.d
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ int main(string[] args)
}

// Have at it
if (chain(root.only, myDeps.byKey).array.anyNewerThan(lastBuildTime))
if (chain(root.only, myDeps.byKey).anyNewerThan(lastBuildTime))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use root.only.chain.myDeps.byKey.anyNewerThan(lastBuildTime) here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it is much harder to read than current version. I'd even go as far as to say that chain should never be used with UFCS unless it is used to append to already existing pipeline.

{
immutable result = rebuild(root, exe, workDir, objDir,
myDeps, compilerFlags, addStubMain);
Expand Down Expand Up @@ -617,7 +617,7 @@ private string[string] getDependencies(string rootModule, string workDir,
scope(exit) collectException(depsReader.close()); // don't care for errors

// Fetch all dependencies and append them to myDeps
auto pattern = regex(r"^(import|file|binary|config|library)\s+([^\(]+)\(?([^\)]*)\)?\s*$");
auto pattern = ctRegex!(r"^(import|file|binary|config|library)\s+([^\(]+)\(?([^\)]*)\)?\s*$");
string[string] result;
foreach (string line; lines(depsReader))
{
Expand Down