News for hackers. Stuff that matters.
Re:First beta release of Alire, the package manager for Ada/... by csb6 on Saturday October 31, 2020 @11:41PM (#24957055)
This seems useful. One thing Ada has been lacking is a central place to upload and use dependencies.

However, I’ve found that pure Ada code without a package manager is pretty easy to integrate using the gprbuild tool; you just copy the dependency’s .ads and .adb files into your project and add their enclosing folder to the list of source directories. gprbuild figures our how to build them pretty much automatically.

So I wish that instead of using TOML files, the dependencies would be specified in the gprbuild project files themselves. The syntax/options of GPR files would probably have to be extended, but it would be nice to have only one layer of config files that contains everything needed to build an Ada library/project.

Re:First beta release of Alire, the package manager for Ada/... by OneWingedShark on Thursday November 05, 2020 @10:03AM (#24998821)
> So I wish that instead of using TOML files, the dependencies would be specified in the gprbuild project files themselves. The syntax/options of GPR files would probably have to be extended, but it would be nice to have only one layer of config files that contains everything needed to build an Ada library/project.

There are several problems with GPR. The first is that it's GNAT-only and no other compiler would recognize it. The second is more technical: GPR is more "stringly-typed" than it ought to be, and thus despite a somewhat Ada-like syntax it isn't nearly as nice as Ada-source.

I've been mulling the idea of leveraging Ada's generic-system for a method to use as a Project specification/definition -- if you could have an Ada generic as a project-file, then you could [re]use the compiler/syntax-checker... I've also sketched out a way that Generic-parameters could be used by a project-builder program, generating an appropriate menu.

Re:First beta release of Alire, the package manager for Ada/... by touisteur on Sunday November 01, 2020 @04:26AM (#24958282)
I agree, put it all in GPR files, no more makefiles, bash scripts. I'd go even further, make project extensions able to define build variables, so I have no more to type -X options...

And with the GPR handling libraries and Libadalang there's already so much you can do...

Re:First beta release of Alire, the package manager for Ada/... by Fabien_C on Monday November 02, 2020 @02:47AM (#24965567)
Another options would be to only have the TOML files and generate gprbuild file on the fly. I think that is something we will consider.
Re:First beta release of Alire, the package manager for Ada/... by jeff-davis on Sunday November 01, 2020 @12:55AM (#24957320)
How do you deal with versioning, etc?
Re:First beta release of Alire, the package manager for Ada/... by csb6 on Sunday November 01, 2020 @02:04AM (#24957709)
GPR project files are just a kind of config file. Their syntax is different than TOML files, but they could easily be given the capability to list dependencies and versions.
Re:First beta release of Alire, the package manager for Ada/... by e12e on Sunday November 01, 2020 @08:48AM (#24959474)
> There is also a net­work graph view of the Alire ecosys­tem: https://alire.ada.dev/network

Nice! Is there something similar for other languages?

Re:First beta release of Alire, the package manager for Ada/... by touisteur on Sunday November 01, 2020 @04:51AM (#24958388)
All I hope is that they'll think about corporate firewalls and provide a simple way to mirror the whole thing (including their gnat-subscriber-only & tools&libs versions). Or at least provide some kind of Web page with all the download links for the transitive dependencies for a package...

PYPI kills me everytime I need to run any ML stuff, and I wish there was a systematic page to d/l all transitive dependencies (at least from requirements files and maybe setup.py static interpretation...)

Re:First beta release of Alire, the package manager for Ada/... by seg_lol on Sunday November 01, 2020 @10:57AM (#24960292)
You could create a zip of the contents of site-packages and add that your PYTHONPATH.

Look for the metadata.json, in the dist-info directory

   {
      "requires": [
        "chardet (>=3.0.2,<4)",
        "idna (>=2.5,<3)",
        "urllib3 (!=1.25.1,<1.26,!=1.25.0,>=1.21.1)",
        "certifi (>=2017.4.17)"
      ]
    }
which I see isn't in all dist-info dirs.

You could also look at

    pip download --no-binary ':all:' --src src requests
It will download the source archives for those package and its deps. I think what you want is within reach. My email is profile, feel free to ask questions.
Re:First beta release of Alire, the package manager for Ada/... by touisteur on Sunday November 01, 2020 @11:08AM (#24960366)
Thanks for the ideas. I had a free AWS instance doing uplink tshark capture during pip install and generated a page with links to all the dependencies (upgrade to a tar of all those later, when discovered the cache option for pip). But I let the instance go when it wasn't free anymore. Yes I'm cheap.
Re:First beta release of Alire, the package manager for Ada/... by shakna on Sunday November 01, 2020 @10:25AM (#24960040)
You can grab and build the index from here [0], and add your own indices (with varying priorities).

But if you want to actually proxy the individual download files, you'll need to iterate over the index files themselves, download them, and change their locations, which isn't overly difficult, but seems a bit beyond scope of a community index.

[0] https://github.com/alire-project/alire-index

Re:First beta release of Alire, the package manager for Ada/... by touisteur on Sunday November 01, 2020 @10:38AM (#24960151)
Thanks for this, shakna.

As I'm trying to upgrade our whole bash-monster GNAT+gnatcoll+lal+florist+gtkada+younameit to the latest GNAT PRO continuous delivery, I wish I could just let some better tool do this...

Re:First beta release of Alire, the package manager for Ada/... by ajxs on Sunday November 01, 2020 @03:37AM (#24958068)
This is a great thing for the Ada community. I hope this encourages more contribution and collaboration on libraries that keep Ada useful for mainstream development.
Re:First beta release of Alire, the package manager for Ada/... by mcguire on Sunday November 01, 2020 @01:38PM (#24961452)
It appears they may need more metadata about packages.

The example "Finding an Ada PDF library" is https://alire.ada.dev/search/?q=pdf. That leads to https://alire.ada.dev/crates/apdf.html, with

    Apdf
    Standalone, portable package for producing dynamically PDF documents

    Author: Gautier de Montmollin
    Maintainer: [email protected]
    License: MIT
    Version: 5.0.0
    Dependencies: No dependency.
    Tags: No tags.
    Badge: [Copy image location: https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/apdf.json]
Searching for Apdf points to http://www.a-pdf.com/, which doesn't look like it's Ada-ish. Is Apdf https://apdf.sourceforge.io/? [Ah, yes it is.]
Re:First beta release of Alire, the package manager for Ada/... by MaxBarraclough on Sunday November 01, 2020 @05:05AM (#24958433)
Congratulations to all involved, this looks like a great addition to the Ada ecosystem.

I like the use of tags to clarify which projects are in SPARK.

I realise it's in beta, but, some feedback: on the linked Crates page, there doesn't seem to be a way to browse the source of the projects. I was expecting to be able to click a link and be taken to something akin to a GitHub page, but this doesn't seem to be possible. Some of the crates link to project home pages.

Also, it would be neat if the Network graph page showed which projects were in SPARK, perhaps by using colour.

Re:First beta release of Alire, the package manager for Ada/... by Fabien_C on Monday November 02, 2020 @02:45AM (#24965557)
Thanks for your feedback :)

- there doesn't seem to be a way to browse the source of the projects.

That's true, so far the contributors for crates have the option to provide a link to a website. This link can be to the repo, but it is not mandatory.

- it would be neat if the Network graph page showed which projects were in SPARK

Good idea :)

Please open issues on the repo so we can keep track of your ideas: https://github.com/alire-project/alire

Re:First beta release of Alire, the package manager for Ada/... by MaxBarraclough on Tuesday November 03, 2020 @12:33PM (#24981807)
Re:First beta release of Alire, the package manager for Ada/... by inamberclad on Sunday November 01, 2020 @11:30AM (#24960527)
'Bout time! A lack of 3rd party libraries is a sticking point for a lot of Ada projects I'd like to do. The first party libraries are great though.
Re:First beta release of Alire, the package manager for Ada/... by pabs3 on Sunday November 01, 2020 @03:14AM (#24957965)
Is Ada a staticly linked language?
Re:First beta release of Alire, the package manager for Ada/... by pjmlp on Sunday November 01, 2020 @04:35AM (#24958319)
All compiled programming languages have supported static linking since the early days, then dynamic linking came into mainstream during the 90's, and most toolchains added support for both models, including Ada compilers.
Re:First beta release of Alire, the package manager for Ada/... by henrikeh on Sunday November 01, 2020 @03:20AM (#24957991)
The GNAT compiler (part of GCC) supports both static and dynamic linking.