[Emacs-ada-mode] Emacs ada-mode gpr management
Stephen Leake
stephen_leake at stephe-leake.org
Sun May 10 06:13:19 PDT 2009
David Sauvage <sauvage.david at gmail.com> writes:
> I found some old discussions [2] about using a gnatgpr tool for the
> emacs ada-mode.
Right, and I had one (gnatpath) on my website for a while (actually,
it's still there, but it will disappear soon; I really need to update
that website!).
I've stopped supporting gnatpath for two reasons:
1) It is not noticeably faster than 'gnat ls', at least on the
machines I use, and for the large projects I have (it is faster
for small projects).
2) It's painful to support for multiple compiler versions, since
AdaCore changes the interfaces of the GPR packages.
On the other hand, I find "gnat list" (and "gnatpath") noticeably
slow, so if gnatgpr is significantly faster, I'd be happy to support
it.
> I've created gnatgpr for another project [3], and i then discover it
> could really satisfy the emacs ada-mode needs .
Almost. Emacs Ada mode needs the list of source directories and object
directories. 'gnatgpr -o' gives the latter; we need the equivalent for
sources (just the directories, not all the files).
> I'm looking for someone who would be interested on integrating gnatgpr
> [1] in emacs ada-mode, while
> i would add the necessarry services in gnatgpr to satisfy the ada-mode
> needs ...
Do you have any data on the above points?
Ah; I see in your README that you do support GPL 2007 and Pro 6.1.2. I
suggest you put that on the web page; it's critical information.
Hmm. It seems you have captured a copy of the AdaCore code that parses
GPR files, rather than trying to use the current compiler source
directly. That makes sense; it insulates you from compiler version
changes, until there is a gpr source language/feature/semantics
change.
What compiler version did you copy this from (I'm guessing GPL 2008)?
There are _two_ compiler versions critical for gnatgpr; the one the
source came from (since it defines the gpr language), and the one used
to compile the source. The latter should be a set containing at least
the current GPL and Pro releases; the former is a single value.
This is essentially a divergence from AdaCore; if they do make
significant changes (like add a new keyword), gnatgpr may just stop
working. But it should not be hard to fix gnatgpr to at least ignore
the new stuff. Or we could grab a new copy of the compiler source and
"do it right" :).
Why do you say gnatgpr is "GNAT dependent"? Just "with GNAT.OS_Lib",
or more than that? In general, non-gnat systems might benefit from gpr
files.
I've compiled gnatgpr (on Debian with GPL 2008); it works, and seems
quite fast on my large project. I'll do some more testing. (It's
always nice when the Makefile "just works" :) (but it probably won't on
Windows :( ).
Since I'm no longer supporting gnatpath, I wouldn't mind changing the
Emacs side of this interface; it wasn't well-designed in the first
place.
I'll hack up something that lets Emacs Ada mode work with gnatgpr, if
you can show me how to modify gnatgpr to get the source directory
listing.
--
-- Stephe
More information about the Emacs-ada-mode
mailing list