From: mockturtle <framefritti@gmail.com>
Subject: Problem (and solution) with gnatcoll_db2ada
Date: Fri, 25 Jan 2013 07:23:33 -0800 (PST)
Date: 2013-01-25T07:23:33-08:00 [thread overview]
Message-ID: <5d81f181-5b5e-4b70-bcb2-0eba26d78465@googlegroups.com> (raw)
Dear all,
maybe this is of some interest to few people, but I think it is worth documenting it.
Recently I began working with AWS and GNATCOLL.SQL. According to the documentation about the gnatcoll_db2ada tool
http://docs.adacore.com/gnatcoll-docs/sql.html#the-gnatcoll-db2ada-tool
by using the option '-adacreate' gnatcoll_db2ada creates (in package Database) a procedure Create_Database that creates the database at runtime. However, when I try to compile database.adb I get the following error
database.adb:136:15: non-visible declaration at gnatcoll-sql-exec.ads:208
The problem is that the procedure Database_Connection called at the end of database.adb is in GNATCOLL.SQL.Exec, not visible from database.adb.
A "with + use" will, of course, cure the problem, but, as you can imagine, it gets pretty boring to add "with + use" every time you change your scheme (not often, fortunately, but it happens during the development...).
Since I still have around the sources of gnatcoll_db2ada, I searched for the bug and I discovered that it suffices to add just one line in gnatcoll_db2ada-generate.adb
The following is the result of
diff gnatcoll_db2ada-generate.adb gnatcoll_db2ada-generate.adb~
442,443d441
< Put_Line
< (Body_File, "with GNATCOLL.SQL.Exec; use GNATCOLL.SQL.Exec;");
in case you want to apply the correction yourself. My version is quite new, I downloaded the source archive on Jan 18.
I hope this can be useful.
Best regards,
Riccardo Bernardini
next reply other threads:[~2013-01-25 15:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 15:23 mockturtle [this message]
2013-01-28 11:09 ` Problem (and solution) with gnatcoll_db2ada briot.emmanuel
2013-01-28 15:33 ` ake.ragnar.dahlgren
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox