Skip to content
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

Aborting due to fetch failure: this error message is Less Than Awesome #399

Open
van-de-bugger opened this issue Mar 23, 2021 · 0 comments

Comments

@van-de-bugger
Copy link

zef error message is Less Than Awesome. It shortly states what happened but gives absolutely no clue why it happened. --verbose and --debug options do not help.

Context and Actual Behaviour

zef fetch Data::MessagePack fails:

$ zef fetch Data::MessagePack
===> Searching for: Data::MessagePack
===> Fetching [FAIL]: Data::MessagePack:ver<0.1.2> from git@github.com:pierre-vigier/Perl6-Data-MessagePack.git
Aborting due to fetch failure: Data::MessagePack:ver<0.1.2> (use --force-fetch to override)

It could be Data::MessagePack problem — the module last update was 3 years ago. However, I am complaining on zef error message. It is very laconic: "Aborting due to fetch failure". Ok, I have got that fetching failed but then I want to know why fetching failed. It could be either network issue, or problem with github, or outdated module, or problem with the local system, e. g. one of external programs like curl, git, tar, unzipis not installed, out of disk space, whatever else. Hundreds of reasons to fail are possible. I want to know it in order to fix it and fetchData::MessagePack`.

Let's try verbose output first:

$ zef --verbose fetch Data::MessagePack
===> Searching for: Data::MessagePack
===> Found: Data::MessagePack:ver<0.1.2> [via Zef::Repository::Ecosystems<p6c>]
===> Fetching [FAIL]: Data::MessagePack:ver<0.1.2> from git@github.com:pierre-vigier/Perl6-Data-MessagePack.git
Aborting due to fetch failure: Data::MessagePack:ver<0.1.2> (use --force-fetch to override)

One more message "Found: Data…", but it does not make failure reason clear. Let's try --debug now:

$ zef --debug fetch Data::MessagePack
===> Searching for: Data::MessagePack
===> Found: Data::MessagePack:ver<0.1.2> [via Zef::Repository::Ecosystems<p6c>]
===> Fetching: Data::MessagePack
[Data::MessagePack] Fetching git@github.com:pierre-vigier/Perl6-Data-MessagePack.git with plugin: Zef::Service::Shell::git+{<anon|1>}
===> Fetching [FAIL]: Data::MessagePack:ver<0.1.2> from git@github.com:pierre-vigier/Perl6-Data-MessagePack.git
Aborting due to fetch failure: Data::MessagePack:ver<0.1.2> (use --force-fetch to override)

I see one more message "Fetching…", but it does not make failure reason clear. Let's try recommended --force-fetch option:

$ zef fetch --force-fetch Data::MessagePack
===> Searching for: Data::MessagePack
===> Fetching [FAIL]: Data::MessagePack:ver<0.1.2> from git@github.com:pierre-vigier/Perl6-Data-MessagePack.git
[Data::MessagePack] Failed to fetch, but continuing with --force-fetch
Cannot resolve caller parent(IO::Path:U: ); none of these signatures match:
    (IO::Path:D: Int:D $depth is copy, *%_)
    (IO::Path:D: *%_)

Oops. Reason for fetch failure is still unclear.

Probably I can find some clue somewhere in ~/.zef directory?

$ find ~/.zef/store -name '*MessagePack*'

~/.zef/store does not include any file or directory named *MessagePack*.

$ tree ~/.zef/tmp
/home/vdb/.zef/tmp
├── 1616531467.151151.2434.4042001098987
│   └── Perl6-Data-MessagePack.git
├── 1616531485.151212.1598.7622904693444
│   └── Perl6-Data-MessagePack.git
└── 1616531492.151245.6004.376880403791
    └── Perl6-Data-MessagePack.git

6 directories, 0 files

~/.zef/tmp has a few subdirectories but no files at all.

"Aborting due to fetch failure". That's all what I allowed to know.

Expected Behavior

I expect zef carefully writes interaction with the external world to a log file. Does zef run external commands, like curl or git? Let zef write complete command line to the log before executing it. Also copy the program output to the log, as well as the program exit status. In case of failure show the path to the log file to user, e. g.:

Aborting due to fetch failure. See ~/.zef/1616531467.151151.2434.4042001098987/zef.log for details.

Steps to Reproduce

$ zef fetch Data::MessagePack
$ zef --debug fetch Data::MessagePack
$ zef --debug fetch --force-fetch Data::MessagePack

Your Environment

$ raku -v
This is Rakudo version 2020.07 built on MoarVM version 2020.07
implementing Raku 6.d.

$ zef --version
v0.11.5

$ zef list --installed 
===> Found via /usr/share/perl6/vendor
zef:ver<0.8.2>:auth<github:ugexe>:api<0>
===> Found via /usr/share/perl6/core
CORE:ver<6.d>:auth<perl>
===> Found via /home/vdb/.raku
App::Mi6:ver<1.1.5>:auth<cpan:SKAJI>
Audio::Taglib::Simple:ver<0.0.8>:auth<Adrian Kreher>
CPAN::Uploader::Tiny:ver<0.0.7>:auth<cpan:SKAJI>
Config::Parser::yaml:ver<1.0.1>:auth<github:scriptkitties>
Config:ver<3.0.3>:auth<cpan:TYIL>:api<3>
Debugger::UI::CommandLine
File::Directory::Tree:auth<labster>
File::Find:ver<0.1.1>
File::Temp:ver<0.0.8>
File::Which:ver<1.0.1>
HTTP::Tinyish:ver<0.3.0>:auth<cpan:SKAJI>
Hash::Merge:ver<2.0.0>:auth<github:scriptkitties>:api<2>
IO::Glob:ver<0.9.0>:auth<github:zostay>
IO::Path::XDG:ver<0.2.0>:api<0>
JSON::Class:ver<0.0.15>:auth<github:jonathanstowe>:api<1.0>
JSON::Fast:ver<0.15>
JSON::Marshal:ver<0.0.19>:auth<github:jonathanstowe>:api<1.0>
JSON::Name:ver<0.0.4>:auth<github:jonathanstowe>:api<1.0>
JSON::Unmarshal:ver<0.08>
LibraryMake:ver<1.0.0>:auth<github:retupmoca>
License::SPDX:ver<3.11.0>:auth<github:jonathanstowe>:api<1.0>
Log::Any:ver<0.9.5>
Log:ver<0.3.0>:auth<cpan:TYIL>:api<0>
META6:ver<0.0.24>:auth<github:jonathanstowe>:api<1.0>
MIME::Base64:ver<1.2.1>:auth<github:retupmoca>
OO::Monitors:ver<1.1.1>
Pod::Load:ver<0.5.6>
Pod::To::HTML:ver<0.8.1>:auth<github:Raku>
Pod::To::Markdown:ver<0.1.4>
Shell::Command
TAP:ver<0.1.0>
Template::Mustache:ver<1.2.3>:auth<github:softmoth>
Terminal::ANSIColor:ver<0.5>
Test::META:ver<0.0.16>:auth<github:jonathanstowe>:api<1.0>
Test::Output:ver<1.001002>
URI:ver<0.3.0>
YAML::Parser::LibYAML:ver<0.0.6>:auth<zef:tony-o>
YAMLish:ver<0.0.5>
zef:ver<0.11.5>:auth<github:ugexe>:api<0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant