phobos
phobos copied to clipboard
Fix Issue #18491 pass default values as parameter not template parameters in Logger
https://issues.dlang.org/show_bug.cgi?id=18491
Thanks for your pull request, @burner!
Bugzilla references
Auto-close | Bugzilla | Severity | Description |
---|---|---|---|
✓ | 18491 | enhancement | std.experimental.logger default values after variadic template parameters |
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub fetch digger
dub run digger -- build "master + phobos#6208"
The style checker fails to consider default arguments in ddoc parameter counting. I rechecked by hand and all passable parameters have ddoc comments.
The style checker fails to consider default arguments in ddoc parameter counting. I rechecked by hand and all passable parameters have ddoc comments.
It's not even the style checker per se, but Ddoc.
Check that Ddoc runs without errors
../dmd/generated/linux/debug/64/dmd -conf= -I../druntime/import -w -de -dip25 -m64 -fPIC -transition=complex -g -debug -defaultlib= -debuglib= generated/linux/debug/64/libphobos2.a -w -D -Df/dev/null -main -c -o- $(find etc std -type f -name '*.d') 2>&1
I think Ddoc expects documentation for parameters like int line = __LINE__
.
See https://run.dlang.io/is/cW31iD
Not good. I have not the time nor the knowledge to fix ddoc to get this PR passing.
@burner All you have to do is add all of the parameters to the Params
section.
Jenkins has a build failure for libasync because libasync has its own logging functions that are just nothrow
wrappers for std.experimental.logging and call logImpl
with explicit __LINE__
, etc. template parameters.
@n8sh thanks
@JackStouffer @wilzbach ping
What's the way forward on this? To move the current std.experimental.logger
to stdx.experimental.logger
(like with allocators) and submit a PR to libasync to use that?
@n8sh sounds like a plan.
@n8sh @ZombineDev I do not follow. Please elaborate.
@burner Example of what I was talking about: https://github.com/atilaneves/automem/pull/20
PRs like that were made for several/many? projects that had been using std.experimental.allocator
.
Ok, so we are moving stuff to code.dlang.org and give a version number. So people who don't want to rewrite and link against that!? And after that we change upstream?
@burner yes, this is so they can upgrade to a newer version of stdx and the compiler independently. Very often people use dmd
, dmd-beta
and even dmd-nightly
for CI testing, which makes breaking changes (for which a deprecation period can't be reasonably enforced) especially painful.
We can make breaking changes with experimental packages as long as the project tester passes. In this case it's libasync which depends on std.experimental.logger.
Anyhow as you also have other PRs for this module, separating it as a dub module might make moving forward a lot easier for you and people who use the module.