From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.179.136 with SMTP id r130mr2883366ywh.162.1488130558124; Sun, 26 Feb 2017 09:35:58 -0800 (PST) X-Received: by 10.157.52.34 with SMTP id v31mr777413otb.9.1488130558085; Sun, 26 Feb 2017 09:35:58 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!68no11362itg.0!news-out.google.com!78ni1979itm.0!nntp.google.com!68no11705itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 26 Feb 2017 09:35:57 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2600:8807:a6c0:5:10f0:d3c:74f8:7bf6; posting-account=b0GbAwoAAABU2b-bFrG729pG1wqiQ19f NNTP-Posting-Host: 2600:8807:a6c0:5:10f0:d3c:74f8:7bf6 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <202fe398-a448-4beb-93ad-f93c6be1fea4@googlegroups.com> Subject: Interface Units for Standalone Libraries and units with'ed by the body From: Scott Loyd Injection-Date: Sun, 26 Feb 2017 17:35:58 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:33420 Date: 2017-02-26T09:35:57-08:00 List-Id: I have created a standalone library which is called by other Ada code. The = problem is that every time I 'with' a package into the body (not the spec!)= of the standalone library, GNAT tells me the unit is not in the interface = set for the library but is needed by the body. That's true, and why should = I care? Callers should not need to have units needed explicitly by the impl= ementation exposed as interface units, should they? >From http://www.cs.fsu.edu/~baker/ada/gnat/html/gnat_ugn_20.html#SEC226 "A Stand-alone Library (abbreviated "SAL") is a library that contains the n= ecessary code to elaborate the Ada units that are included in the library. = In contrast with an ordinary library, which consists of all sources, object= s and `ALI' files of the library, a SAL may specify a restricted subset of = compilation units to serve as a library interface. In this case, the fully = self-sufficient set of files will normally consist of an objects archive, t= he sources of interface units' specs, and the `ALI' files of interface unit= s. If an interface spec contains a generic unit or an inlined subprogram, t= he body's source must also be provided; if the units that must be provided = in the source form depend on other units, the source and `ALI' files of tho= se must also be provided." I am not using generic units or inlined subprograms so what am I missing he= re?