houseabsolute / Log-Dispatch

Dispatches messages to one or more outputs
https://metacpan.org/release/Log-Dispatch/
Other
12 stars 29 forks source link

Log-Any-Adapter-Dispatch broken since Log-Dispatch 2.60 #40

Closed pghmcfc closed 7 years ago

pghmcfc commented 7 years ago

See http://www.cpantesters.org/cpan/report/206238d6-f1c6-11e6-bb94-6bc77d6e3ab9 for example:

# Testing Log::Any::Adapter::Dispatch 0.06, Perl 5.024001, /tmp/basesmoker-reloperl-9QJ2/bin/perl
t/00-load.t ... ok
found extra parameters: [category] at /home/sand/src/perl/repoperls/installed-perls/host/k93x64sid/v5.24.1/fae6/lib/site_perl/5.24.1/Exception/Class/Base.pm line 88.
    Exception::Class::Base::throw("Params::ValidationCompiler::Exception::Named::Extra", "message", "found extra parameters: [category]", "parameters", ARRAY(0x56080a23f5f0)) called at (eval 141)[/home/sand/src/perl/repoperls/installed-perls/host/k93x64sid/v5.24.1/fae6/lib/site_perl/5.24.1/Eval/Closure.pm:149] line 98
    Eval::Closure::Sandbox_115::__ANON__[(eval 141)[/home/sand/src/perl/repoperls/installed-perls/host/k93x64sid/v5.24.1/fae6/lib/site_perl/5.24.1/Eval/Closure.pm:149]:104]("outputs", ARRAY(0x56080a6e68f0), "category", "main") called at /home/sand/src/perl/repoperls/installed-perls/host/k93x64sid/v5.24.1/fae6/lib/site_perl/5.24.1/Log/Dispatch.pm line 52
    Log::Dispatch::new("Log::Dispatch", "outputs", ARRAY(0x56080a6e68f0), "category", "main") called at /tmp/loop_over_bdir-16101-czJM5C/Log-Any-Adapter-Dispatch-0.06-0/blib/lib/Log/Any/Adapter/Dispatch.pm line 15
    Log::Any::Adapter::Dispatch::init(Log::Any::Adapter::Dispatch=HASH(0x56080a6e6b00), "outputs", ARRAY(0x56080a6e68f0), "category", "main") called at /home/sand/src/perl/repoperls/installed-perls/host/k93x64sid/v5.24.1/fae6/lib/site_perl/5.24.1/Log/Any/Adapter/Base.pm line 16
    Log::Any::Adapter::Base::new("Log::Any::Adapter::Dispatch", "outputs", ARRAY(0x56080a6e68f0), "category", "main") called at /home/sand/src/perl/repoperls/installed-perls/host/k93x64sid/v5.24.1/fae6/lib/site_perl/5.24.1/Log/Any/Manager.pm line 72
    Log::Any::Manager::_new_adapter_for_entry(Log::Any::Manager=HASH(0x56080978f100), HASH(0x56080a6e6ae8), "main") called at /home/sand/src/perl/repoperls/installed-perls/host/k93x64sid/v5.24.1/fae6/lib/site_perl/5.24.1/Log/Any/Manager.pm line 171
    Log::Any::Manager::_reselect_matching_adapters(Log::Any::Manager=HASH(0x56080978f100), qr(.*)) called at /home/sand/src/perl/repoperls/installed-perls/host/k93x64sid/v5.24.1/fae6/lib/site_perl/5.24.1/Log/Any/Manager.pm line 122
    Log::Any::Manager::set(Log::Any::Manager=HASH(0x56080978f100), "Dispatch", "outputs", ARRAY(0x56080a6e68f0)) called at /home/sand/src/perl/repoperls/installed-perls/host/k93x64sid/v5.24.1/fae6/lib/site_perl/5.24.1/Log/Any/Adapter.pm line 19
    Log::Any::Adapter::set("Log::Any::Adapter", "Dispatch", "outputs", ARRAY(0x56080a6e68f0)) called at t/dispatch.t line 62
# Looks like your test exited with 255 before it could output anything.
t/dispatch.t .. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 56/56 subtests 

Test Summary Report
-------------------
t/dispatch.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 56 tests but ran 0.
Files=2, Tests=1,  0 wallclock secs ( 0.02 usr  0.02 sys +  0.27 cusr  0.05 csys =  0.36 CPU)
Result: FAIL
Failed 1/2 test programs. 0/1 subtests failed.
Makefile:779: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255

I don't know if that module is doing something unsupported or if something got missed in the switch to Params::ValidationCompiler, but Log-Any-Adapter-Dispatch hasn't changed since 2010 so I guess it's not actively maintained.

It's still failing with 2.62 but you don't get the (possibly useful) stack trace.

autarch commented 7 years ago

This really should be fixed in Log::Any::Adapter::Dispatch. It's passing arguments to Log::Dispatch that Log::Dispatch does not, and never did, accept.

preaction commented 7 years ago

It looks like the repository is https://github.com/jonswar/perl-log-any-adapter-dispatch. I've got ownership of the main Log-Any dist, and I could help you (@pghmcfc) with getting a patch in and released (going through the PAUSE admins to get releaser privileges for you or me if @jonswar is indeed out of communication). But I agree it's not Log::Dispatch's fault that the Log-Any adapter has always done something wrong.

pghmcfc commented 7 years ago

@preaction, I think you're a better candidate for this than I am, as my interest is mainly as a downstream packager of something that has Log::Any::Adapter::Dispatch as a dependency. I noticed the failure in Fedora's continuous integration system, koschei. I don't actually have a PAUSE account myself.

I'd be happy to help out with testing if that's any help.

preaction commented 7 years ago

I have no stake in this at all except as the maintainer of Log-Any and a wish to see a healthy Log-Any (and CPAN in general) ecosystem. Please open the bug against the other Github project. We'll see if jonswar picks it up. If he doesn't, I can't provide a patch, so I'd need you to do that. Once a patch is provided, I can help get it uploaded to CPAN, but I would also prefer you to do that (PAUSE accounts are free, after all). I mostly offered to help you navigate the process for taking over a module in CPAN if jonswar is not available to add you to the list of authorized maintainers.

But the summary is: This is not a problem with Log::Dispatch and this ticket should be closed.

autarch commented 7 years ago

Closing.

preaction commented 7 years ago

For anyone who comes across this later, this issue has been fixed in https://github.com/preaction/Log-Any-Adapter-Dispatch/commit/eb7f74b60f31a6ca14a3393c1208fc7509ea89f9 and released to CPAN as Log::Any::Adapter::Dispatch v0.07.