comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Got to ask this about GPS: Do others have the same problems with Python?
Date: Wed, 04 Mar 2020 15:04:25 +0000
Date: 2020-03-04T15:04:25+00:00	[thread overview]
Message-ID: <lyzhcwupom.fsf@pushface.org> (raw)
In-Reply-To: SCC7G.200865$0k2.111871@fx06.iad

Rick Newbie <nuttin@nuttn.nowhere> writes:

> For instance: I create a procedure header in an ADS file then use the
> "Generate Body Of ..." from the context menu and I get this in the
> output window:

Not just Windows! On macOS, the first time I tried it (on a spec that
shouldn't have had a body) I got

   gnat stub -P/Users/simon/tmp/so/rules.gpr /Users/simon/tmp/so/rules.ads /Users/simon/tmp/so/

but no .adb.

The second time, I got the same output as you describe (modulo Windows
vs Unix).

The third time, after I added a subprogram (so a body was valid), it
worked.

The fourth time, after I removed the subprogram, back we are with your
error!

Traceback (most recent call last):
  File "/opt/gnat-ce-2019/share/gps/support/core/gps_utils/__init__.py", line 352, in do
    r = callback()
  File "/opt/gnat-ce-2019/share/gps/support/core/gnatstub.py", line 173, in generate_plain_body
    generate_body(as_separate=False)
  File "/opt/gnat-ce-2019/share/gps/support/core/gnatstub.py", line 153, in generate_body
    command += x_args + [file.path, file.directory()]
AttributeError: 'NoneType' object has no attribute 'path'

If I run the command that GPS says it's executing by hand, I get

$ gnat stub -P/Users/simon/tmp/so/rules.gpr /Users/simon/tmp/so/rules.ads /Users/simon/tmp/so/
gnatstub: tree file rules.adt already exists use -r or -t to reuse or to overwrite it

so I use -t and get

$ gnat stub -t -P/Users/simon/tmp/so/rules.gpr /Users/simon/tmp/so/rules.ads /Users/simon/tmp/so/
gnatstub: Compilation unit Rules does not require a body

(and rules.adt has been deleted, so I don't need to use -t next time).

  parent reply	other threads:[~2020-03-04 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04  0:28 Got to ask this about GPS: Do others have the same problems with Python? Rick Newbie
2020-03-04 11:54 ` Markus Schöpflin
2020-03-24  3:53   ` Rick Newbie
2020-03-24  7:25     ` Markus Schöpflin
2020-03-04 15:04 ` Simon Wright [this message]
2020-03-05  2:26 ` Anh Vo
replies disabled

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