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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.208.133 with SMTP id m127mr1341374itg.7.1516889603717; Thu, 25 Jan 2018 06:13:23 -0800 (PST) X-Received: by 10.157.15.236 with SMTP id m41mr869342otd.7.1516889603476; Thu, 25 Jan 2018 06:13:23 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g80no548176itg.0!news-out.google.com!b73ni10633ita.0!nntp.google.com!g80no548172itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 25 Jan 2018 06:13:23 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.218.37.33; posting-account=W2gdXQoAAADxIuhBWhPFjUps3wUp4RhQ NNTP-Posting-Host: 76.218.37.33 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <65063c98-03e6-4ff6-a582-26244837b0a5@googlegroups.com> Subject: Re: Resolving Long Filenames for Packages From: Stephen Leake Injection-Date: Thu, 25 Jan 2018 14:13:23 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 393214648 X-Received-Bytes: 3721 Xref: reader02.eternal-september.org comp.lang.ada:50143 Date: 2018-01-25T06:13:23-08:00 List-Id: On Wednesday, January 24, 2018 at 10:23:20 AM UTC-6, alex...@juniv=C3=B6rs.= com wrote: > expressions-parser-automata (the directory) > expressions-parser-automata-automaton_x.adb > expressions-parser-automata-automaton_x.ads > expressions-parser-automata-automaton_y.adb > expressions-parser-automata-automaton_y.ads > expressions-parser-automata-automaton_z.adb > expressions-parser-automata-automaton_z.ads > expressions-parser-automata-automaton_w.adb > expressions-parser-automata-automaton_w.ads > ... > Once again, how would I generally go about structuring an Ada application= to avoid such long filenames? Is there some sort of compiler option I can = use? Can I do something about it inside my project (`gpr`) file? >=20 > Best regards, The absolute name of each of these files is: /.../expressions-parser-automata-automaton/expressions-parser-automata-aut= omaton_w.ads There are two ways to make that shorter; shorten the file name part, or sho= rten the directory part. As you point out in a later post, shortening the file name part while keepi= ng the same package name requires one entry in the Naming config package pe= r file, which is tedious and error prone. You can also flatten the package hierarchy, but I'll assume you have a good= reason for that hierarchy. Shortening the directory part is easy; just put all the files in the parent= directory. You don't give a good rationale for using a subdirectory here; you say it i= s because the file names are "extremely long", but putting them in a subdir= ectory makes the names longer, so that makes no sense.=20 One reason to use a subdirectory is to make it easier to select a different= set of files for a particular project; do you have other projects that use= the rest of this source code, but not the files in this directory? It would be possible to modify gprbuild to support a second convention for = file names, that maps the package hierarchy to the directory hierarchy as J= ava does. You'd have to put up money to convince AdaCore to implement that.= =20 You might be able use the gprname tool to automate generating the Naming pa= ckage; that tool is documented in the gprbuild manual. Personally, I much prefer a flatter directory hierarchy - that's one reason= I prefer Ada over Java - certainly not the most important reason. -- Stephe