alire-project / alire

Command-line tool from the Alire project and supporting library
GNU General Public License v3.0
288 stars 49 forks source link

Some crates are not listed in https://alire.ada.dev/crates.html #1402

Closed mgrojo closed 1 year ago

mgrojo commented 1 year ago

Found out by @zertovitch

Some context: currently, alr search --list displays 366 crates, but on the page there are only 363 of them. Missing are LEA, GWindows and Win32Ada.

I guess it happens with Windows-only crates. Looking at this: https://github.com/alire-project/alire.ada.dev/blob/f22d61db8a57302d891b757f1289bd6448daf229/update-gh-pages.sh#L34C21-L34C21

I think this command does not work on Linux because the crate is not available. I reproduce it:

$ alr --no-tty show --jekyll gwindows
Not found: gwindows*

The web should list all crates, indicating the OS where they are available.

Apparently, the problem is only with the --jekyll argument:

$ alr --no-tty show gwindows
gwindows=1.4.1: GWindows - Ada Framework for Windows Development
Origin: commit 916c14e9f74eb2db5a4797284ab14fa71d66ed9d from https://github.com/zertovitch/gwindows.git
Available when: (case OS is Windows => True, others => False)
Properties:
   Author: David Botton
   Author: Gautier de Montmollin
   Description: GWindows - Ada Framework for Windows Development
   Environment: PATH=${CRATE_ROOT}/alire/build/gnatcom/tools:${PATH}
   Executable: bindcom
   Executable: comscope
   Executable: createcom
   Executable: makeguid
   License: LGPL-2.0-or-later
   Maintainer: Felix Patschkowski <felix.patschkowski@nexperia.com>
   Maintainer: gdemont@hotmail.com
   Maintainers_Logins: patschkowski
   Maintainers_Logins: zertovitch
   Name: gwindows
   Project_File: gnatcom/gnatcom.gpr
   Project_File: gnatcom/gnatcom_tools.gpr
   Project_File: gwindows/gwindows.gpr
   Project_File: gwindows/gwindows_contrib.gpr
   Tag: gui
   Version: 1.4.1
   Website: https://sourceforge.net/projects/gnavi/
mgrojo commented 1 year ago

It seems related to this TODO comment: https://github.com/alire-project/alire/blob/5c17abb0dc6ed48158ebd51750761317063b5ccd/src/alr/alr-commands-show.adb#L237-L239

zertovitch commented 1 year ago

I was able to reproduce the issue with alr --no-tty show --jekyll on Windows, by trying to show info about a Linux-based crate (epoll).

Fabien-Chouteau commented 1 year ago

The website update script runs on Linux and so only the crates available on Linux are shown. I think that's what is happening. There might be a way to get all the crates even the ones not available.

zertovitch commented 1 year ago

Sure. Especially since the alr show command without --jekyll shows any crate, even if it doesn't support the OS where the command is run.

zertovitch commented 7 months ago

Tremendous, the formerly hidden crates are now visible on the Web site: https://alire.ada.dev/crates.html since it uses Alire 2.0.0+ !