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

zef pre-run test #350

Open
finanalyst opened this issue May 29, 2020 · 14 comments
Open

zef pre-run test #350

finanalyst opened this issue May 29, 2020 · 14 comments

Comments

@finanalyst
Copy link

I am installing Rakudo on a new server, and ran into the backend not configured problem. It took a while to realise that git had not been installed (fresh server).

Suggestion

Would it be possible to have a one-off zef-check option that zef runs the first time that verifies whether software it relies on is present in a system, eg. git, curl, unzip.
A bit like the environment checks that are in a makefile.

These 'environment' softwares are normally available on a developer's system, but not on a fresh server, or one where the intention is to install a minimum number of dependencies.

@ugexe
Copy link
Owner

ugexe commented May 29, 2020

Well those backend are all plugins. For instance no one on Linux cares that powershell is not installed. Additionally the only required backend is the one for handling paths — everything else (tar, git) is extra and depends on the ecosystems you need to use and can’t be determined until runtime when you actually give it a query (it can’t know you need git until it has to look for something and ends up with a git url, which is not always the case).

@ugexe
Copy link
Owner

ugexe commented May 29, 2020

However a command that outputs all the plugins and if their ‘probe’ status is true would be viable.

@finanalyst
Copy link
Author

I think that output from a probe for all plugins would be good. So if zef fails because a plugin fails, there is some more information about which one. Although when I got the info back, I checked unzip and curl. I didn't think to check if I had git. So I went looking elsewhere.

@melezhik
Copy link

My suggestion if one tries to install git hosted module and git client is not here, zef will notify it

@ugexe
Copy link
Owner

ugexe commented May 29, 2020

zef already notifies you of the possible backend missing in such a scenario

@melezhik
Copy link

melezhik commented May 29, 2020 via email

@ugexe
Copy link
Owner

ugexe commented May 29, 2020

Enabled fetching backends [git path curl wget] don't understand $foobar
You may need to configure one of the following backends, or install its
underlying software - [git wget]

@finanalyst
Copy link
Author

finanalyst commented Jun 13, 2020

It seems the information is there, but perhaps rewording the message might help.
Instead of

You may need to configure one of the following backends, or install its
underlying software - [git wget]

Perhaps the following

The following packages are needed by zef [ git wget ] but are either missing 
or have a non-standard configuration. Try installing or reinstalling [ git wget ].

@ugexe
Copy link
Owner

ugexe commented Jun 13, 2020

That wording only makes sense for those specific backend. It doesn’t make sense for e.g. the powershell or perl based backends. The error message only tells us the adapter itself could not load, which may not even shell out to something so just using stronger wording to suggest what is missing will just make it confusing in a different way.

@ugexe
Copy link
Owner

ugexe commented Jun 13, 2020

And those backends aren’t needed by zef... someone else might have written a different curl backend (which is actually the case)

@melezhik
Copy link

melezhik commented Jun 13, 2020

hi @ugexe I second @finanalyst option. Irrespective on zef underlying model, is it a big deal for zef to check that git installed or nor not and then just say so? On my experience we have so many cases when git is not installed and this why zef could not install git based Raku modules which for the moment quite a few.

@melezhik
Copy link

The error message only tells us the adapter itself could not load, which may not even shell out to something so just using stronger wording to suggest what is missing will just make it confusing in a different way.

right, so maybe that is the issue with git backend?

@melezhik
Copy link

melezhik commented Jun 13, 2020

or maybe we need to change zef backends API, when plugin might have a configuration method, which should return false and detailed information if any of backend dependencies are missing, so that zef could call backend.configure before start using a backend?

@ugexe
Copy link
Owner

ugexe commented Jun 13, 2020

On my experience we have so many cases when git is not installed and this why zef could not install git based Raku modules which for the moment quite a few.

which should return false and detailed information if any of backend dependencies are missing

I mean it literally tells you "You may need to configure one of the following backends, or install its underlying software - [git wget]" as soon as it knows it needs something you don't have to do what you ask. You can install local path modules without curl/wget/etc, and indeed almost every single raku user uses this workflow as the first thing they do raku -I. bin/zef install . (and thus requires no git/curl/wget/powershell fetcher to be configured. An interactive initial start would be terrible -- see cpanm over cpan)

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

3 participants