New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[build.d] Print stdout for dmd #11352
Conversation
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#11352" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just making sure - that prints stderr
not stdout
, right?
if (output.length > 0) { | ||
auto ruleName = name.length ? name : "log"; | ||
// add [<name>] prefix to all log messages | ||
output.splitter(newline).map!(e => "[" ~ ruleName ~ "] " ~ e).joiner(newline).writeln; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output.splitter(newline).map!(e => "[" ~ ruleName ~ "] " ~ e).joiner(newline).writeln; | |
output.splitter(newline).each!(ln => writeln('[', ruleName, "] ", ln)); |
is simpler I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This risks interleaving with other log messages from other processes (build.d might executes multiple dependencies at the same time).
It prints both - https://dlang.org/phobos/std_process.html#.execute |
Not sure I like this special case, I would rather make the following changes:
|
Closing in favor of #11641 |
CC @andralex
Downside is that it prints the TLS warning twice now. Maybe only in verbose mode?