Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-Git CPAN distribution.

Report information
The Basics
Id: 101851
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-Git

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.029
Fixed in: 2.032-TRIAL



Subject: Files cannot be gathered from a non-default root
This config in my plugin bundle failed: [Git::GatherDir / default minting profile] root = share/profiles/github prefix = share/profiles/default The stack trace: [default minting profile] Module.pm does not exist! [default minting profile] Module.pm does not exist! at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Log/Dispatchouli.pm line 308. Log::Dispatchouli::log(Log::Dispatchouli=HASH(0x7fb3741b5168), HASH(0x7fb3746f0130), "Module.pm does not exist!") called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Log/Dispatchouli/Proxy.pm line 105 Log::Dispatchouli::Proxy::log(Log::Dispatchouli::Proxy=HASH(0x7fb3752484e0), HASH(0x7fb3746f0130), "Module.pm does not exist!") called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Log/Dispatchouli/Proxy.pm line 114 Log::Dispatchouli::Proxy::log_fatal(Log::Dispatchouli::Proxy=HASH(0x7fb3752484e0), "Module.pm does not exist!") called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/darwin-2level/Moose/Meta/Method/Delegation.pm line 110 Dist::Zilla::Plugin::GatherDir::log_fatal(Dist::Zilla::Plugin::Git::GatherDir=HASH(0x7fb3747d01d8), "Module.pm does not exist!") called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Plugin/GatherDir.pm line 225 Dist::Zilla::Plugin::GatherDir::_file_from_filename(Dist::Zilla::Plugin::Git::GatherDir=HASH(0x7fb3747d01d8), Path::Tiny=ARRAY(0x7fb378981f10)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Plugin/Git/GatherDir.pm line 83 Dist::Zilla::Plugin::Git::GatherDir::__ANON__[/Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Plugin/Git/GatherDir.pm:96](Dist::Zilla::Plugin::Git::GatherDir=HASH(0x7fb3747d01d8)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/darwin-2level/Moose/Meta/Method/Overridden.pm line 38 Dist::Zilla::Plugin::Git::GatherDir::gather_files(Dist::Zilla::Plugin::Git::GatherDir=HASH(0x7fb3747d01d8)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Dist/Builder.pm line 317 Dist::Zilla::Dist::Builder::build_in(Dist::Zilla::Dist::Builder=HASH(0x7fb374737930)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Dist/Builder.pm line 302 Dist::Zilla::Dist::Builder::build(Dist::Zilla::Dist::Builder=HASH(0x7fb374737930)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/App/Command/build.pm line 66 Dist::Zilla::App::Command::build::execute(Dist::Zilla::App::Command::build=HASH(0x7fb373980368), Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x7fb373a3a8a8), ARRAY(0x7fb371bd4da0)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/App/Cmd.pm line 445 App::Cmd::execute_command(Dist::Zilla::App=HASH(0x7fb371832348), Dist::Zilla::App::Command::build=HASH(0x7fb373980368), Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x7fb373a3a8a8)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/App/Cmd.pm line 312 App::Cmd::run("Dist::Zilla::App") called at /Users/ether/.perlbrew/libs/21.6@std/bin/dzil line 12 _file_from_filename is being passed 'Module.pm', when it should be 'share/profiles/github/Module.pm' (the location of the source file). This patch fixes it (line 83): - push @files, $self->_file_from_filename($filename); + push @files, $self->_file_from_filename(Path::Tiny::path($root, $filename)->stringify);
This is the *real* stack trace (the one I included was from after I started hacking on the source): [default minting profile] Module.pm does not exist! [default minting profile] Module.pm does not exist! at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Log/Dispatchouli.pm line 308. Log::Dispatchouli::log(Log::Dispatchouli=HASH(0x7f9a3d1b5168), HASH(0x7f9a41994ad8), "Module.pm does not exist!") called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Log/Dispatchouli/Proxy.pm line 105 Log::Dispatchouli::Proxy::log(Log::Dispatchouli::Proxy=HASH(0x7f9a3e249428), HASH(0x7f9a41994ad8), "Module.pm does not exist!") called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Log/Dispatchouli/Proxy.pm line 114 Log::Dispatchouli::Proxy::log_fatal(Log::Dispatchouli::Proxy=HASH(0x7f9a3e249428), "Module.pm does not exist!") called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/darwin-2level/Moose/Meta/Method/Delegation.pm line 110 Dist::Zilla::Plugin::GatherDir::log_fatal(Dist::Zilla::Plugin::Git::GatherDir=HASH(0x7f9a3e20dd18), "Module.pm does not exist!") called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Plugin/GatherDir.pm line 225 Dist::Zilla::Plugin::GatherDir::_file_from_filename(Dist::Zilla::Plugin::Git::GatherDir=HASH(0x7f9a3e20dd18), "Module.pm") called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Plugin/Git/GatherDir.pm line 83 Dist::Zilla::Plugin::Git::GatherDir::__ANON__[/Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Plugin/Git/GatherDir.pm:96](Dist::Zilla::Plugin::Git::GatherDir=HASH(0x7f9a3e20dd18)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/darwin-2level/Moose/Meta/Method/Overridden.pm line 38 Dist::Zilla::Plugin::Git::GatherDir::gather_files(Dist::Zilla::Plugin::Git::GatherDir=HASH(0x7f9a3e20dd18)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Dist/Builder.pm line 317 Dist::Zilla::Dist::Builder::build_in(Dist::Zilla::Dist::Builder=HASH(0x7f9a3d748258)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/Dist/Builder.pm line 302 Dist::Zilla::Dist::Builder::build(Dist::Zilla::Dist::Builder=HASH(0x7f9a3d748258)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Dist/Zilla/App/Command/build.pm line 66 Dist::Zilla::App::Command::build::execute(Dist::Zilla::App::Command::build=HASH(0x7f9a3c980168), Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x7f9a3ca3a270), ARRAY(0x7f9a3abd4da0)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/App/Cmd.pm line 445 App::Cmd::execute_command(Dist::Zilla::App=HASH(0x7f9a3a832318), Dist::Zilla::App::Command::build=HASH(0x7f9a3c980168), Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x7f9a3ca3a270)) called at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/App/Cmd.pm line 312 App::Cmd::run("Dist::Zilla::App") called at /Users/ether/.perlbrew/libs/21.6@std/bin/dzil line 12
After looking at Git::GatherDir, I decided it was in need of a more substantial rewrite than your patch. I've finally gotten around to doing that. I've also written a new test using non-default roots. Please try https://metacpan.org/release/CJM/Dist-Zilla-Plugin-Git-2.032-TRIAL and see if it fixes your problem.
On 2015-03-28 16:13:03, CJM wrote: Show quoted text
> After looking at Git::GatherDir, I decided it was in need of a more > substantial rewrite than your patch. I've finally gotten around to > doing that. I've also written a new test using non-default roots. > Please try https://metacpan.org/release/CJM/Dist-Zilla-Plugin-Git- > 2.032-TRIAL and see if it fixes your problem.
This seems to work, thanks! I also noticed that 'repo_root' is no longer showing up in x_Dist_Zilla metadata (via [MetaConfig] and the dump_config sub) - it looks like a side effect of your refactoring. (I don't miss it.)
On Sun, Mar 29, 2015 12:50:41 AM, ETHER wrote: Show quoted text
> I also noticed that 'repo_root' is no longer showing up in > x_Dist_Zilla metadata (via [MetaConfig] and the dump_config sub) - it > looks like a side effect of your refactoring. (I don't miss it.)
Yes, Git::GatherDir no longer does Dist::Zilla::Role::Git::Repo, which provided that attribute. (It wasn't actually used, and I'm not sure why that role was included in the first place. Setting repo_root had no effect on Git::GatherDir.)