Skip to content

Removed old debug printfs in std.string#5568

Merged
dlang-bot merged 1 commit intodlang:masterfrom
JackStouffer:string-debug-prints
Jul 7, 2017
Merged

Removed old debug printfs in std.string#5568
dlang-bot merged 1 commit intodlang:masterfrom
JackStouffer:string-debug-prints

Conversation

@JackStouffer
Copy link
Contributor

Continuation of #5180

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @JackStouffer!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@JackStouffer JackStouffer changed the title Removed old debug printfs Removed old debug printfs in std.string Jul 7, 2017
Copy link
Member

@quickfur quickfur left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for cleaning up dead code!

void trustedPrintf(in char* str) @trusted nothrow @nogc
{
import core.stdc.stdio : printf;
printf("%s", str);
Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW: we could do the same for writeln and use assumeNoGC + catch all Exceptions - it would be very, very handy for debugging. Hell, we could only version it with version(debug) ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

debug statements already bypass the @nogc and pure attributes IIRC

Copy link
Member

Choose a reason for hiding this comment

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

No, they only bypass pure.

@dlang-bot dlang-bot merged commit 3c76440 into dlang:master Jul 7, 2017
@wilzbach
Copy link
Contributor

wilzbach commented Jul 9, 2017

@JackStouffer I just noticed that there are a lot more of these old debug printfs hidden in Phobos.
Just run sth. like grep -ir "debug(.*) "
Do you plan to remove them as well?
Or in other words, have at least a look at these files ;-)

  • std.array
  • std.bitmanip
  • std.format
  • std.utf

@JackStouffer JackStouffer deleted the string-debug-prints branch July 9, 2017 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants