-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
alr index reports the most frustrating error message: "Not a readable directory" #1251
Comments
I tried running alr under the debugger. I compiled it with --development, so assertions are enabled. Now it's raising Assertion_Error in Alire.Config.Edit.Set_Path in the main elaboration code. So I did not find the code that reported the frustrating error message. Platform.Folders.Config is returning "C:\home\stephe.config\alire" because that's where HOME is, when I'm running in a mingw32 shell. However, I first ran alr in a PowerShell, where HOME is either not defined or is c:\Users\Stephe, so it setup alire config in c:\Users\Stephe.config\alire, and C:\home\stephe.config\alire doesn't exist. And yet when I run "alr index" (the non-assertions build) with HOME=c:/home/stephe, it reports: NAME URL PATH Very confusing. Apparently with assertions disabled, it falls back to the Windows default home? I'll delete the c:\Users\Stephe.config\alire, and try to start over, always with HOME set properly. |
The lacking error message is at There are some other similarly improvable errors close by, so filing this one for enhancement. |
Well that didn't work. alr toolchain --select ended up creating c:\Users\Stephe.config\alire, even though HOME pointed somewhere else. Setting ALR_CONFIG=c:/home/stephe/.config/alire makes 'alr toolchain' use that directory. So I'll use that as a workaround on Windows for now. Something is not using HOME consistently. Hmm. Maybe because it's "/home/stephe" instead of "c:/home/stephe"? Nope, that did not help. Running 'alr toolchain' with the assertions enabled build raises the assertion error, before it tries to install the default config. So that's not consistent either. |
Setting ALR_CONFIG did not solve the original problem with "alr index --add ...". More debugging later. |
The assertion failure is from the Dynamic _Predicate on type Absolute_Path. That calls Alire.Check_Absolute_Path. The version compiled is in os_linux, but I'm on Windows! So the alr environment is wrong for this build. That's because there are several settings of "*OS" in the various *.gpr; alr_env.gpr is not with'd by any other gpr. so they all end up as "unix". I'll submit a separate issue on this. |
After using the recommended build procedure for alr (issue 1255), I managed to get a better error message (patch attached): "alr index --help" does not say what the url argument should point to; I assumed this would work. Ah; I changed the url to use https instead of git@github: $ c:/Projects/Alire/alire-main/bin/alr.exe index --add https://github.com/stephe-ada-guru/alire-index.git#stephe-patches --name stephepatches --before community One more try: $ c:/Projects/Alire/alire-main/bin/alr.exe index --add git+https://github.com/stephe-ada-guru/alire-index.git#stephe-patches --name stephepatches --before community That seems to have worked. So this issue is a request for three things:
The url should use the git+https or file: scheme, and point to a git repository containing the index. |
This error message was improved by #1523. |
Running on Windows:
alr -v index --add [email protected]:stephe-ada-guru/alire-index.git#stephe-patches --name stephepatches --before community
-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
-> Found 1 indexes
ERROR: Not a readable directory
-> alr index unsuccessful
which directory? the program knows perfectly well what directory it is trying to read; include it in the error message!
Happens both in an Alire workspace and out.
The text was updated successfully, but these errors were encountered: