i’ve finally been getting into Ada (although i’ve been programming since the early 80s, using BASICs on 6502-based machines like the TRS-80 and the BBC B). As a result, i’ve created the ‘Ada’ page on the Gentoo wiki, Ada - Gentoo wiki, to try to document what i’ve been learning, in the hope that it might smooth the way for others.
With regards to Irvise’s remark:
He had issues getting Ada working in Emacs. The Ada-mode in Emacs needs to be maintained and refactored to become easier to use. Basically, it has to become “plug & play”.
and Lucretia’s remark:
Other’s said in the chat numerous times that the emacs ada-mode didn’t work and you had to use the older one, I dunno, I gave up on ada-mode and emacs years ago, because I assumed as did he, that once installed, it should just work, which it never did, because you have to compile it yourself, which is a bad move.
Yes, setting up ada-mode in Emacs required more work than i’ve come to expect for setting up language support in Emacs nowadays. A significant part of the above wiki page describes what i learned after some hours of futzing around: Ada - Gentoo wiki
In particular, i found that:
Version 8.1.0 also requires copying the file ada_annex_p_lr1_re2c_parse_table.txt from the top level of the ada-mode-8.1.0 directory to the relevant installation location.
i sent an email to the ada-mode-users list on 20 February about this:
@flexibeast welcome to the Ada community!
I regularly use EMACS at work for C and C++. Sadly, I gave up using it for Ada because I ran into issues with the ada-mode. I’ve since switched over to Visual Studio Code and the ada-lang server, but I am not a fan of the indentation style. I probably should consider using GPS.
Unfortunately, the author of ada-mode has retired, which most likely explains why you haven’t received a reply to your message that you submitted back in Feb. I’ll admit, part of me feels the urge to learn how ada-mode works and see how much effort it is to maintain. I dunno…
Unfortunately, the author of ada-mode has retired, which most likely explains why you haven’t received a reply to your message that you submitted back in Feb.
Ah okay, that would indeed explain it. i’ll note that on the wiki page.
I’ve since switched over to Visual Studio Code and the ada-lang server, but I am not a fan of the indentation style … I’ll admit, part of me feels the urge to learn how ada-mode works and see how much effort it is to maintain. I dunno…
Hmm. i’m not yet that familiar with how the Language Server Protocol works; is the indentation style something permanently determined by each specific server implementation, and not user-configurable? i ask because i’m wondering if you’ve tried using ALS with any or all of Eglot by itself, or Eglot + ada-mode, or the LSP-mode package?
I wonder what build method you used? I just tried with Alire, and (modulo battles between Apple’s git and the “inverted monorepo” which holds the ada-mode source) it seemed OK.
I wonder what build method you used? I just tried with Alire, and (modulo battles between Apple’s git and the “inverted monorepo” which holds the ada-mode source) it seemed OK.
For the purposes of the wiki page, i didn’t use Alire, but the procedure i documented on the wiki page, under “Installation”, “Configuration”, and “Emacs setup”. Although i did put in a note about the end of GNAT Community releases and the transition to Alire, i can imagine a number of Gentoo users not wanting an entire GCC-based toolchain outside of Portage, possibly duplicating at least some things already installed (or installable) via Portage, and not configurable or maintainable through all the standard Portage mechanisms.
When i wrote my previous post, it was ~3am local, and i was merely out of bed briefly; i took a quick look, but decided to not post further here until after i’d slept. Now that i have, and it’s ~9am:
Yes, it seems to me - at least as someone new to the Ada ecosystem - that resolving that bug would be helpful for Gentoo Ada users. i can certainly add my voice to that bug - and i’ll try to do so later today - although i’m not a Gentoo dev myself, and i also don’t know how much time and space the members of the Ada Project team currently have.
More generally, i’m getting the impression there might be a developing tension between Linux distros and Alire regarding control and management of the Ada toolchain on the system. Am i correct to say that, even if the referenced bug is resolved, using Alire on Gentoo will still result in Alire pulling in its own copy of the Ada toolchain, regardless of what’s already on the system?
alire can use an already installed gnat and gprbuild.
Ah okay, good! i’ll have to take a closer look then, so that i can wiki-document how to combine use of Alire with a Portage-based toolchain. (And, suggestions as to how i could improve the wiki page are welcome!)
It’s a pity that an Emacs user like you or Tsoding cannot use Ada in your editor. Since there’s Ada code to compile to make the ada-mode work, it is not so easy to install as other pure Elisp packages. Nevertheless, installing the last version for me was mostly straightforward using Alire.
Hi, I recall the issues I ran into was that the scripts did not work on Windows but worked on Linux. In addition, I think there was a dependency missing (eglot??) which was not obvious. The added step of needing to compile also wasn’t ideal. I am wondering if the recent AppImage creation crate that was recently posted can help avoid the need to compile on Linux, and instead be a simple binary download.
I just tried to install ada-mode 8.1.0 on my Linux box and used Alire 2.0 to build it. It seems to work overall. However, I did run into an issue where a specific line cause the rest of the file to fail to indent properly and there were CONSTRAINT or STORAGE_ERROR exceptions reported which prevented any auto indentation from that point on. Other than that, it seems to work in my small tests.
Edit: oh, and we also have old-ada-mode and ada-ts-mode, so I guess there’s a real problem here and different people trying to fix it in different ways.