comp.lang.ada
 help / color / mirror / Atom feed
* GNATBench 2.1.0 (free) and file/procedure naming case
@ 2009-03-09 15:41 John McCabe
  2009-03-09 19:50 ` britt.snodgrass
  0 siblings, 1 reply; 7+ messages in thread
From: John McCabe @ 2009-03-09 15:41 UTC (permalink / raw)


Hi

I've just got a new PC so I've installed GNAT 2008. I like Eclipse so
I've installed that with GNATBench.

Now, some time last year I had a problem with GNATBench in that, when
I tried to build a project, it came up with an odd message about not
being able to execute the command "<some nonsense string>" etc. That
still happens, so I've sorted it the same way I did back then which is
to make sure I have a version of make called make.exe in my path.

However the latest thing I have is that GNATBench doesn't appear to
maintain the casing I use for files/folders and procedure. For
example, I put in TestAdaProj as the project name and MyMain as the
main procedure and it creates folders and files called testadaproj and
mymain.adb respectively. Is there something I've done wrong here that
anyone can think of.

This is a newer version of GNATBench than I used before, yet it still
seems to have all sorts of issues (possibly trivial, but very
annoying).

Has anyone got any idea what's happening with Hibachi? That seems to
have gone completely dead.

Thanks for your help.
John




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GNATBench 2.1.0 (free) and file/procedure naming case
  2009-03-09 15:41 GNATBench 2.1.0 (free) and file/procedure naming case John McCabe
@ 2009-03-09 19:50 ` britt.snodgrass
  2009-03-10 11:38   ` John McCabe
  0 siblings, 1 reply; 7+ messages in thread
From: britt.snodgrass @ 2009-03-09 19:50 UTC (permalink / raw)


On Mar 9, 10:41 am, John McCabe <j...@nospam.assen.demon.co.uk> wrote:

>
> However the latest thing I have is that GNATBench doesn't appear to
> maintain the casing I use for files/folders and procedure. For
> example, I put in TestAdaProj as the project name and MyMain as the
> main procedure and it creates folders and files called testadaproj and
> mymain.adb respectively. Is there something I've done wrong here that
> anyone can think of.
>

Try putting the following in your GPR file:

package Naming is
   for Casing use "mixedcase";  --  otherwise, default is "lowercase"
end Naming;

This is described in the GNAT User's Guide (section 11.11, Naming
Schemes).

I haven't tried this myself since I use GNAT's default naming
conventions.  Regarding GPR files, I've found it better to edit them
manually (in Eclipse) rather than use the GNATbench (or GPS) project
properties editor.

>
> Has anyone got any idea what's happening with Hibachi? That seems to
> have gone completely dead.

I lurk on the Hibachi mailing list. List traffic dropped to near zero
long ago, so it is effectively dead. I don't miss it. GNATbench is
much better if you are using GNAT as your compiler.

- Britt





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GNATBench 2.1.0 (free) and file/procedure naming case
  2009-03-09 19:50 ` britt.snodgrass
@ 2009-03-10 11:38   ` John McCabe
  2009-03-10 12:28     ` Jean-Pierre Rosen
  2009-03-16 20:19     ` Brian Gaffney
  0 siblings, 2 replies; 7+ messages in thread
From: John McCabe @ 2009-03-10 11:38 UTC (permalink / raw)


On Mon, 9 Mar 2009 12:50:59 -0700 (PDT), britt.snodgrass@gmail.com
wrote:

Hi Britt,

>On Mar 9, 10:41�am, John McCabe <j...@nospam.assen.demon.co.uk> wrote:
>
>>
>> However the latest thing I have is that GNATBench doesn't appear to
>> maintain the casing I use for files/folders and procedure. For
>> example, I put in TestAdaProj as the project name and MyMain as the
>> main procedure and it creates folders and files called testadaproj and
>> mymain.adb respectively. Is there something I've done wrong here that
>> anyone can think of.

>Try putting the following in your GPR file:

>package Naming is
>   for Casing use "mixedcase";  --  otherwise, default is "lowercase"
>end Naming;

>This is described in the GNAT User's Guide (section 11.11, Naming
>Schemes).

>I haven't tried this myself since I use GNAT's default naming
>conventions.  Regarding GPR files, I've found it better to edit them
>manually (in Eclipse) rather than use the GNATbench (or GPS) project
>properties editor.

For what it's worth, chances are that may work fine, but this issue
happens when creating a project from Eclipse. If I then set that value
and rename all my files and folders to what I wanted in the first
place, the Ada Project Explorer in Eclipse gets totally lost.

It's so phenomenally frustrating; I can't see that I'm doing anything
particularly odd or unusual, yet every time I try to use GNATBench it
just seems to put all sorts of obstacles in my way instead of just
working!

Maybe it's just me!

>> Has anyone got any idea what's happening with Hibachi? That seems to
>> have gone completely dead.

>I lurk on the Hibachi mailing list. List traffic dropped to near zero
>long ago, so it is effectively dead.

Oh dear. Seemed like such a good idea.

>I don't miss it. GNATbench is
>much better if you are using GNAT as your compiler.

You're using the paid for version though aren't you? Perhaps that just
works better!



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GNATBench 2.1.0 (free) and file/procedure naming case
  2009-03-10 11:38   ` John McCabe
@ 2009-03-10 12:28     ` Jean-Pierre Rosen
  2009-03-10 21:27       ` sjw
  2009-03-16 20:19     ` Brian Gaffney
  1 sibling, 1 reply; 7+ messages in thread
From: Jean-Pierre Rosen @ 2009-03-10 12:28 UTC (permalink / raw)


John McCabe a �crit :
> However the latest thing I have is that GNATBench doesn't appear to
> maintain the casing I use for files/folders and procedure. For
> example, I put in TestAdaProj as the project name and MyMain as the
> main procedure and it creates folders and files called testadaproj and
> mymain.adb respectively. Is there something I've done wrong here that
> anyone can think of.
> 
Maybe you are confused between unit names and file names. In the Ada
world, we care about units (the content), not so much about files (the
container).

In the case of Gnat, it has precise rules for matching unit names with
file names, and it requires all *file* names to be lowercase. This is
because case is not significant in Ada; there must be some convention to
make sure that BLAH Blah and bLaH all fetch the same file - here blah.ads.

In short: name your units as you please, and let the environment choose
the appropriate file name for you.

-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GNATBench 2.1.0 (free) and file/procedure naming case
  2009-03-10 12:28     ` Jean-Pierre Rosen
@ 2009-03-10 21:27       ` sjw
  2009-03-11  8:34         ` Jean-Pierre Rosen
  0 siblings, 1 reply; 7+ messages in thread
From: sjw @ 2009-03-10 21:27 UTC (permalink / raw)


On Mar 10, 12:28 pm, Jean-Pierre Rosen <ro...@adalog.fr> wrote:
> John McCabe a écrit :> However the latest thing I have is that GNATBench doesn't appear to
> > maintain the casing I use for files/folders and procedure. For
> > example, I put in TestAdaProj as the project name and MyMain as the
> > main procedure and it creates folders and files called testadaproj and
> > mymain.adb respectively. Is there something I've done wrong here that
> > anyone can think of.
>
> Maybe you are confused between unit names and file names. In the Ada
> world, we care about units (the content), not so much about files (the
> container).
>
> In the case of Gnat, it has precise rules for matching unit names with
> file names, and it requires all *file* names to be lowercase. This is
> because case is not significant in Ada; there must be some convention to
> make sure that BLAH Blah and bLaH all fetch the same file - here blah.ads.
>
> In short: name your units as you please, and let the environment choose
> the appropriate file name for you.

I don't think this can be right. See the GNAT Project Manager page on
*file* naming:
http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gnat_ugn_unw/Naming-Schemes.html#Naming-Schemes

Personally, though, I'd go with the default: lower-case filenames,
mixed-case Ada names (and, John, I think you'd have a better chance of
getting GNATbench to use mixed case in some predictable way if you
Used_Underscores ratherThanRunningThingsTogether)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GNATBench 2.1.0 (free) and file/procedure naming case
  2009-03-10 21:27       ` sjw
@ 2009-03-11  8:34         ` Jean-Pierre Rosen
  0 siblings, 0 replies; 7+ messages in thread
From: Jean-Pierre Rosen @ 2009-03-11  8:34 UTC (permalink / raw)


sjw a �crit :
>> In short: name your units as you please, and let the environment choose
>> the appropriate file name for you.
> 
> I don't think this can be right. See the GNAT Project Manager page on
> *file* naming:
> http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gnat_ugn_unw/Naming-Schemes.html#Naming-Schemes
> 
Yes, of course, you can change the convention from the default one, but
I think the problem the OP had is that *some* files had names that did
not follow the default (or any other) convention.

So my advice can become: choose any convention you like for file names,
but once you have it, let the environment deal with file names. And by
all means, be consistent.

> Personally, though, I'd go with the default: lower-case filenames,
> mixed-case Ada names (and, John, I think you'd have a better chance of
> getting GNATbench to use mixed case in some predictable way if you
> Used_Underscores ratherThanRunningThingsTogether)

Agreed
-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GNATBench 2.1.0 (free) and file/procedure naming case
  2009-03-10 11:38   ` John McCabe
  2009-03-10 12:28     ` Jean-Pierre Rosen
@ 2009-03-16 20:19     ` Brian Gaffney
  1 sibling, 0 replies; 7+ messages in thread
From: Brian Gaffney @ 2009-03-16 20:19 UTC (permalink / raw)


I haven't used GNATBench, but part of the problem may be that the GNAT tools 
on Windows convert file names to lowercase.  Long ago, using different cases 
(i.e. on command line calls) would cause internal GNAT errors.  The same 
issue did not impact Linux (etc).

With the standard GNAT tools, the files they create are lowercase, but they 
will find files of any case.  I don't know if if manually renaming the files 
would work here.

"John McCabe" <john@nospam.assen.demon.co.uk> wrote in message 
news:a0kcr49vefr9gcocl7aonis52rrbjm3gu5@4ax.com...
> On Mon, 9 Mar 2009 12:50:59 -0700 (PDT), britt.snodgrass@gmail.com
> wrote:
>
> Hi Britt,
>
>>On Mar 9, 10:41 am, John McCabe <j...@nospam.assen.demon.co.uk> wrote:
>>
>>>
>>> However the latest thing I have is that GNATBench doesn't appear to
>>> maintain the casing I use for files/folders and procedure. For
>>> example, I put in TestAdaProj as the project name and MyMain as the
>>> main procedure and it creates folders and files called testadaproj and
>>> mymain.adb respectively. Is there something I've done wrong here that
>>> anyone can think of.
>
>>Try putting the following in your GPR file:
>
>>package Naming is
>>   for Casing use "mixedcase";  --  otherwise, default is "lowercase"
>>end Naming;
>
>>This is described in the GNAT User's Guide (section 11.11, Naming
>>Schemes).
>
>>I haven't tried this myself since I use GNAT's default naming
>>conventions.  Regarding GPR files, I've found it better to edit them
>>manually (in Eclipse) rather than use the GNATbench (or GPS) project
>>properties editor.
>
> For what it's worth, chances are that may work fine, but this issue
> happens when creating a project from Eclipse. If I then set that value
> and rename all my files and folders to what I wanted in the first
> place, the Ada Project Explorer in Eclipse gets totally lost.
>
> It's so phenomenally frustrating; I can't see that I'm doing anything
> particularly odd or unusual, yet every time I try to use GNATBench it
> just seems to put all sorts of obstacles in my way instead of just
> working!
>
> Maybe it's just me!
>
>>> Has anyone got any idea what's happening with Hibachi? That seems to
>>> have gone completely dead.
>
>>I lurk on the Hibachi mailing list. List traffic dropped to near zero
>>long ago, so it is effectively dead.
>
> Oh dear. Seemed like such a good idea.
>
>>I don't miss it. GNATbench is
>>much better if you are using GNAT as your compiler.
>
> You're using the paid for version though aren't you? Perhaps that just
> works better! 





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-16 20:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 15:41 GNATBench 2.1.0 (free) and file/procedure naming case John McCabe
2009-03-09 19:50 ` britt.snodgrass
2009-03-10 11:38   ` John McCabe
2009-03-10 12:28     ` Jean-Pierre Rosen
2009-03-10 21:27       ` sjw
2009-03-11  8:34         ` Jean-Pierre Rosen
2009-03-16 20:19     ` Brian Gaffney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox