Getada was inspired by Rustup[2] and aside from the init script is written entirely in Ada.
It's completely open source and you can check out the readme and code on github[3]. It currently supports all non-windows platforms that Alire has an official release for, which at present is Linux (glibc) and MacOS. If you try running it on an unsupported platform, it tries to point you in the right direction. For example, you can install Alire on windows with an already-existing installer.
It downloads the latest version of Alire[4] (Ada's toolchain and package manager, similar to Cargo) for your platform as a zip file to a temporary directory and then extracts it to a binary directory. By default the temporary directory (configure with "-t /directory" or "--tmp=/directory") defaulted to $TMPDIR or /tmp. The config directory is ~/.getada (change via "-c /directory", "--cfg=/directory", or $GETADA_CFG), and the alr and getada binaries go in ~/.getada/bin (configure with ""-b /directory", "--bin=/directory", or $GETADA_BIN). It also tries to add the file to your path by dropping a "env.sh" file into ~/.profile/ (disable with -p or --no-path).
If you don't allow executables in temporary or home directories, you can change all of these via environmental variables or passing parameters.
You can remove it all by running: getada --uninstall
Now you can create a brand new Ada project with: alr init --bin my_project (How to use Alire[5] for more details)
Since one of the biggest complaints about Ada is getting the toolchain [6], I hope this can solve a lot of problems for newcomers to the language.
[3] https://github.com/aj-ianozi/getada
I do feel Ada as a language is way ahead of its time, but when I was learning it (a while before the first Alire release) I was also puzzled by dev environment setup. I guess the Rust experience has shown the importance of a friendly onboarding experience, so I’m very glad to see Ada is going this direction as well with Alire and now Getada :)
It might be just me, but Alire isn't great, I tried it multiple times, it's great for getting complicated dependencies e.g Utilada, but I go for GPRBuild as it just avoids all the fuss when programming across Linux/macOS.
I might try a hard switch at one point as I didn't use Alire 2.0.0 that much, so maybe it's better now.
alire doesn't let you use capital letters...
I never had trouble with this? Apt-get install gnat or similar has always worked for me. I only played around with Ada though, never did anything serious with it. Installing from source wasn't too bad either. But, trying to install spark from source was a big mess back in the day. I don't know about now.
I've seen the last parts get newcomers tripped up so Getada takes the rustup approach.
It uses github's api to retrieve the latest published release of alire[1] and then downloads and extracts it to a specified directory in $HOME. Then it creates an env file[2] and sources that file in .profile and/or .zshenv. It also logs everything that it does so it can undo it later with getada --uninstall
[1] https://github.com/alire-project/alire/releases
[2] Here's roughly what the env file looks like that it creates https://github.com/AJ-Ianozi/getada/blob/main/src/shells.adb...
Is that considered a high bar for software developers to get right?
I don't know if this tool solves the problem, but on musl systems (eg. Apline) you have to build Alire from source... i.e. bootstrapping, dependencies... it's not pretty.
Not yet but it's on my list as a "phase 2" of sorts for getada. I have an alpine VPS that I'm playing around with but the main issue is that while alire can be built for alpine, any compilers it pulls from its toolchain won't work with it since none of them are built against musl. We've been talking about it here https://github.com/alire-project/alire/issues/792#issuecomme...
Comprehensive IntelliJ-level IDE tooling could bring Ada to the forefront where it belongs. Would be nice anyway.
(I hardly...)