* Ada Mode and GNAT Project files @ 2008-08-15 4:50 deadlyhead 2008-08-15 8:56 ` Georg Bauhaus 0 siblings, 1 reply; 7+ messages in thread From: deadlyhead @ 2008-08-15 4:50 UTC (permalink / raw) This has been discussed before, specifically by Ludovic Brenta in 2005. <http://groups.google.com/group/comp.lang.ada/browse_thread/ thread/8ca2d617a0d92ff/2dad47ea5cfa17ed?lnk=gst&q=ada+mode+gnat+project +files#2dad47ea5cfa17ed> I'm wondering if anything ever came of plans to replace Ada Mode Projects with GNAT Projects. There are many benefits to making this change, so I thought I'd ask if there was anyone in the know. I've sent a message to the emacs-ada-mode mailing list inquiring about this and offering my help if Stephe is interested in incorporating it. Maybe Ludovic could supply the work that he's already done to get things started? I appreciate all replies. I'll be starting my first large Ada project soon, and this feature would be a huge help. Ada + Emacs is already one of the best development environments out there as I'm sure you all know. Tighter integration would make it even better. --deadlyhead ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Ada Mode and GNAT Project files 2008-08-15 4:50 Ada Mode and GNAT Project files deadlyhead @ 2008-08-15 8:56 ` Georg Bauhaus 2008-08-15 10:19 ` deadlyhead 0 siblings, 1 reply; 7+ messages in thread From: Georg Bauhaus @ 2008-08-15 8:56 UTC (permalink / raw) deadlyhead schrieb: > This has been discussed before, specifically by Ludovic Brenta in > 2005. <http://groups.google.com/group/comp.lang.ada/browse_thread/ > thread/8ca2d617a0d92ff/2dad47ea5cfa17ed?lnk=gst&q=ada+mode+gnat+project > +files#2dad47ea5cfa17ed> I'm wondering if anything ever came of plans > to replace Ada Mode Projects with GNAT Projects. There are many > benefits to making this change, so I thought I'd ask if there was > anyone in the know. I'd vote against a complete replacement and in favor of a simple abstraction: - where to find files and - where to find navigation information (such as can be extracted from .ali files). Then it is still possible to steer the compiler with a -P switch and maybe a Lisp variable for the "external" project settings. One reason is that GNAT project files are, well, GNAT specific. They are not standard, though open, but other Ada compilers use different project descriptions, use different options, and so on. However, all compilers need to know where to find sources, and many if not all produce information that can be used for navigation. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Ada Mode and GNAT Project files 2008-08-15 8:56 ` Georg Bauhaus @ 2008-08-15 10:19 ` deadlyhead 2008-08-15 10:33 ` Ludovic Brenta 2008-08-15 10:57 ` Georg Bauhaus 0 siblings, 2 replies; 7+ messages in thread From: deadlyhead @ 2008-08-15 10:19 UTC (permalink / raw) On Aug 15, 1:56 am, Georg Bauhaus <rm.dash-bauh...@futureapps.de> wrote: > I'd vote against a complete replacement and in favor > of a simple abstraction: > > - where to find files and > > - where to find navigation information > > (such as can be extracted from .ali files). Then it is still > possible to steer the compiler with a -P switch and maybe > a Lisp variable for the "external" project settings. > > One reason is that GNAT project files are, well, GNAT specific. > They are not standard, though open, but other Ada compilers > use different project descriptions, use different options, > and so on. > However, all compilers need to know where to find sources, > and many if not all produce information that can be used > for navigation. Well, at the moment, Ada Mode for Emacs is GNAT specific. This makes perfect sense, though, as both GNAT and Emacs are part of the GNU project. There's nothing stopping proprietary compiler developers from contributing their own generalizing patches to Ada Mode if they like, but it's unreasonable, I think, to have a free software project try to accommodate proprietary vendors' products without access to their documentation in a free and open manner. With that out of the way, a different approach would be to add a Lisp variable to Ada Mode which indicates whether a GNAT *.gpr (or some other vendors project file) is to be used, and having Ada Mode simply use that rather than the current (or recently current) .adp files. It would take care of the general navigation information you're looking for, but still provide the added power of whatever project facilities are provided by the compilation system. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Ada Mode and GNAT Project files 2008-08-15 10:19 ` deadlyhead @ 2008-08-15 10:33 ` Ludovic Brenta 2008-08-16 13:04 ` Stephen Leake 2008-08-15 10:57 ` Georg Bauhaus 1 sibling, 1 reply; 7+ messages in thread From: Ludovic Brenta @ 2008-08-15 10:33 UTC (permalink / raw) On Aug 15, 12:19 pm, deadlyhead <deadlyh...@gmail.com> wrote: > On Aug 15, 1:56 am, Georg Bauhaus <rm.dash-bauh...@futureapps.de> > wrote: > > > > > I'd vote against a complete replacement and in favor > > of a simple abstraction: > > > - where to find files and > > > - where to find navigation information > > > (such as can be extracted from .ali files). Then it is still > > possible to steer the compiler with a -P switch and maybe > > a Lisp variable for the "external" project settings. > > > One reason is that GNAT project files are, well, GNAT specific. > > They are not standard, though open, but other Ada compilers > > use different project descriptions, use different options, > > and so on. > > However, all compilers need to know where to find sources, > > and many if not all produce information that can be used > > for navigation. > > Well, at the moment, Ada Mode for Emacs is GNAT specific. This makes > perfect sense, though, as both GNAT and Emacs are part of the GNU > project. There's nothing stopping proprietary compiler developers > from contributing their own generalizing patches to Ada Mode if they > like, but it's unreasonable, I think, to have a free software project > try to accommodate proprietary vendors' products without access to > their documentation in a free and open manner. > > With that out of the way, a different approach would be to add a Lisp > variable to Ada Mode which indicates whether a GNAT *.gpr (or some > other vendors project file) is to be used, and having Ada Mode simply > use that rather than the current (or recently current) .adp files. It > would take care of the general navigation information you're looking > for, but still provide the added power of whatever project facilities > are provided by the compilation system. There are two ways to provide support for GNAT project files in ada- mode: my first approach was to completely replace the .adp project file with the .gpr file, parse it and extract the source path. I never went so far as to also find and parse "with"ed project files, though. The more complete and portable approach, implemented by Stephe Leake, was to call "gnat ls -P", pass it the project file, and parse the result. The advantage is that it simplifies parsing and also supports "with"ed project files. Stephe's approach is better, of course. That's why I never merged my fork into Stephe's ada-mode. But if you are still interested in my version, I put it on Ada-France's monotone server [1,2,3]. [2] is my fork and [3] is Stephe's upstream version, probably outdated by now. [1] http://www.ada-france.org/article131.html [2] http://www.ada-france.org:8081/branch/changes/org.ludovic-brenta.ada-mode [3] http://www.ada-france.org:8081/branch/changes/org.gnu.emacs.ada-mode -- Ludovic Brenta. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Ada Mode and GNAT Project files 2008-08-15 10:33 ` Ludovic Brenta @ 2008-08-16 13:04 ` Stephen Leake 0 siblings, 0 replies; 7+ messages in thread From: Stephen Leake @ 2008-08-16 13:04 UTC (permalink / raw) Ludovic Brenta <ludovic@ludovic-brenta.org> writes: > There are two ways to provide support for GNAT project files in ada- > mode: my first approach was to completely replace the .adp project > file with the .gpr file, parse it and extract the source path. I never > went so far as to also find and parse "with"ed project files, though. > The more complete and portable approach, implemented by Stephe Leake, > was to call "gnat ls -P", pass it the project file, and parse the > result. The advantage is that it simplifies parsing and also supports > "with"ed project files. For the record, the current Emacs Ada mode is at: http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html It supports using a GNAT project file directly as an Emacs Ada mode project file, or including a GNAT project file as part of a larger Emacs Ada mode project file. The version in Emacs 22.2 does not support GNAT project files; future Emacs releases will include this support. -- -- Stephe ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Ada Mode and GNAT Project files 2008-08-15 10:19 ` deadlyhead 2008-08-15 10:33 ` Ludovic Brenta @ 2008-08-15 10:57 ` Georg Bauhaus 2008-08-16 13:07 ` Stephen Leake 1 sibling, 1 reply; 7+ messages in thread From: Georg Bauhaus @ 2008-08-15 10:57 UTC (permalink / raw) deadlyhead schrieb: > Well, at the moment, Ada Mode for Emacs is GNAT specific. A major part of Ada mode is consistent with Emacs in that it is not at all GNAT specific but addresses just Ada. The 5_000 lines of Lisp code in ada-mode.el are Ada specific, not GNAT specific. So the statement that Ada Mode for Emacs is GNAT specific is overly general. OTOH, replacing GNAT specific parts with other GNAT specific parts does not do any harm---except if this kind of approach affects the entire structure and approach of Ada Mode for Emacs. A form of abstraction inversion. > This makes > perfect sense, though, as both GNAT and Emacs are part of the GNU > project. I'd contend that Free Software may be, and is written to support systems that (unfortunately) are not currently targetted by the GNU system. Also, and in particular, Emacs has tended to provide for "the system compiler", which may or may not be GNAT. A related example, it has been fairly easy to hook a scanner for error messages printed by the free Aonix compiler and relatives. If you have FSF GNAT and the compiler does not currently support Ada feature X, you can try a different compiler. If you are stuck with GNAT (or maybe just the other way around) *because* Ada Mode for Emacs has made supporting other compilers difficult, well... What if you want to work productively using beloved Emacs on a platform that FSF GNAT does not support? > There's nothing stopping proprietary compiler developers > from contributing their own generalizing patches to Ada Mode if they > like, but it's unreasonable, I think, to have a free software project > try to accommodate proprietary vendors' products without access to > their documentation in a free and open manner. On the same narrow basis, one might argue that we should not develop for most of PC computer hardware. Or write control software for flying machine parts, using portable Ada yet a compiler that happens to produce code for a non-GNU target, still using Emacs. Because Emacs is a free software project and jet engines are not free, we should not be using Emacs when writing such Ada software? A ban on everything else also narrows sources of inspiration, and comparison. > With that out of the way, a different approach would be to add a Lisp > variable to Ada Mode which indicates whether a GNAT *.gpr (or some > other vendors project file) is to be used, and having Ada Mode simply > use that rather than the current (or recently current) .adp files. It > would take care of the general navigation information you're looking > for, but still provide the added power of whatever project facilities > are provided by the compilation system. IMHO this view reflects a Microsoft style approach to software: We do our own non-standard thing; we are guided by this non-standard thing. If others write free contributions matching our special APIs, fine. If not, that's the problem of the Emacs user who needs to use Emacs with a non-GNAT Ada compiler. Does this put the long time Emacs user, and maybe contributor, in the center? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Ada Mode and GNAT Project files 2008-08-15 10:57 ` Georg Bauhaus @ 2008-08-16 13:07 ` Stephen Leake 0 siblings, 0 replies; 7+ messages in thread From: Stephen Leake @ 2008-08-16 13:07 UTC (permalink / raw) Georg Bauhaus <rm.dash-bauhaus@futureapps.de> writes: > What if you want to work productively using beloved Emacs > on a platform that FSF GNAT does not support? Patches are always welcome. -- -- Stephe ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-08-16 13:07 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-08-15 4:50 Ada Mode and GNAT Project files deadlyhead 2008-08-15 8:56 ` Georg Bauhaus 2008-08-15 10:19 ` deadlyhead 2008-08-15 10:33 ` Ludovic Brenta 2008-08-16 13:04 ` Stephen Leake 2008-08-15 10:57 ` Georg Bauhaus 2008-08-16 13:07 ` Stephen Leake
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox