annexi-strayline / AURA

The AURA Reference Implementation
BSD 3-Clause "New" or "Revised" License
22 stars 0 forks source link

Question: Does AURA support consuming archived packages? (E.g. a zipped repo) #30

Open dhombios opened 4 months ago

dhombios commented 4 months ago

I've seen the comment in Ada rapporteur group in which you mention this project.

I think that providing a way for distributing libraries without being tight to a particular platform or compiler is important for achieving an ecosystem of open source libraries around Ada. Additionally, having a standardized solution for building complex systems would avoid the current problem that c++ packages have due to the wide variety of package managers, which causes that libraries packaged for one of them cannot be consumed by the others (as a result, sometimes several package managers need to be used for building a single project).

On the other hand, languages in which package management is a key feature, like Java, python or rust, heavily simplify this task. This has helped their library ecosystem and usage to grow, due to how easy is to use them in your projects.

In particular, I like that Java and python provide "standardized" packaging formats for distributing libraries (jar and wheel files), which heavily simplify consuming them even without using a package manager (python requires installing them with pip install library.whl, but it can still be done easily if the package isn't available at pip's repository.

Contrarily, languages like Ada and C require manually copying the entire code base in order to consume the library. Even if it gets precompiled as a static library, specification files or headers need to be provided separately, which makes it significantly harder to use them. In c and c++ this is sometimes solved by making header only libraries (which are harder to maintain and can increase compilation times), but GNAT forces using separate specification and body files, impeding during something like that in Ada (at least without being tight to a particular compiler).

For that reason, some time ago I proposed in https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/19 including a compiler independent file format for package distribution in Ada standard (e.g. a zip file containing all the source files and a manifest). That format should allow also including the documentation and resources needed by the library (configuration files, bitmaps...). The idea is that consuming a library that just uses standard Ada code would just require specifying the location of that archive, instead of all the specification files.

Looking at AURA docs, I could just find how to consume local or git repositories. Does AURA support something like that?

Richard-Wai commented 2 weeks ago

Sorry for the late reply - What you describe is exactly what the "local" repository format. If in a Repository Declaration you set Format to Local, and Location to an arbitrary path which contains subsystem directories, it will pull from those. AURA subsystems are, in their simplest form, a directory containing the source to a single Ada subsystem (root package and decedents). Optionally it can contain a manifest, which is just an Ada specification, that can then define more advanced "auto configuration" processes.

dhombios commented 1 week ago

That sounds really simple, I was expecting something way more complex, similarly to what happens in Conan repositories.

Does AURA work with different Ada compilers or just gnat? Is that structure also used by alire?

I think that it would be great if an structure like became part of Ada standard (maybe in an annex) to avoid ending up having the same problems that C++ libraries face when they need to be distributed (requiring to have different configuration files for vcpkg, Conan, cmake, etc to be available in every of them)