ada-mode-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnu Emacs Ada mode 7.0.1 released.


From: Stephen Leake
Subject: Re: Gnu Emacs Ada mode 7.0.1 released.
Date: Tue, 04 Feb 2020 17:59:47 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt)

Simon Wright <address@hidden> writes:

>>> gprbuild -p  -c -u -f /Users/simon/cortex-gnat-rts/common/a-reatim.adb
>>> using project file common.gpr
>>> gprbuild: "/users/simon/cortex-gnat-rts/common/a-reatim.adb" was
>>> not found in the sources of any project
>>> 
>>> ==========
>>> 
>>> Similar behaviour for C-c C-c (for make).
>> 
>> In the second case, there is no gprfile given in the gprbuild command
>> line; I'm guessing that is the cause of the reported error. 
>
> Yes. even though it says 'using project file common.gpr'."

That message is from gprbuild; it's telling you what gpr file it decided
to use, since you did not give it one.

Maybe ada-mode should issue a warning or error when this happens?
Something like:

    "no ada-mode project found; change project-find-functions? (see 
ada-mode.info)"
    
That would be more helpful than the mysterious errors you reported.

On the other hand, we want to support building a very simple Ada project
that has no gpr file, so this is not simple.

At the very least, I should document this symptom in ada-mode.info

>> When in the two Ada buffers, what does "Ada | Project files | Show
>> project" show? 
>
> In both cases, build_runtime.

Hmm. Where did that name come from? Did you select a file with that
name? It should have been empty in a-reatime.adb.

Hmm. What do you have ada-build-prompt-prj set to? I'm guessing
'default; ada-build-require-project-file returns a default project with
no gpr file in that case.

>> What do you have in project-find-functions? You probably need to set
>> that manually to wisi-prj-current-cached or wisi-prj-current-parse; see
>> the wisi info section "Selecting projects" and ada-mode info section "Use
>> multiple GNAT project files".
>
> project-find-functions is (wisi-prj-find-dominating-cached
> project-try-vc). I have to change it.

Ok.

> By the way, in that section of ada-mode.info <http://ada-mode.info/>, it says 
> *Note Selecting projects: (wisi)Selecting projects.
> but "Info file wisi does not exist".

Oops; packaging bug.

> I did change it, and all is well, thanks.

Ok, good.

> Are you sure this changed behaviour is a good thing?

We could argue about what ada-build.el does when project-find-functions
is not already set; I'm guessing you'd prefer it to set
project-find-functions to wisi-prj-current-cached, since that handles
the most complex projects, and thus is what you need?

I was worried that would force people to reselect a project when they
wanted to change projects. But that is what they had to do in 6.3, so
that would be more consistent.

On the other hand, people with several simple projects might prefer the
-dominating behaviour, which they get now by default.

The issue is what sort of projects ada-mode newbies will be using in the
future; I was assuming they would like -dominating, but I really have no
idea :(. AdaCore might know.

I sometimes prefer -dominating myself; I keep changing my mind.

-- 
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]