comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: organizing deep source trees with child packages
Date: Thu, 13 Oct 2011 07:18:27 -0700 (PDT)
Date: 2011-10-13T07:18:27-07:00	[thread overview]
Message-ID: <7179717a-9837-476c-b564-6599a9c02acd@ff5g2000vbb.googlegroups.com> (raw)
In-Reply-To: 3486b228-abdd-490f-b4ef-9ee6b19f65fa@gy7g2000vbb.googlegroups.com

Greg Moncreaff wrote on comp.lang.ada:
> 100's of files?  unless it was auto generated from a domain model,
> how can you possibly keep it organized as to what depends on what,
> what is separable, reusable; what deals with one interface/component/
> peer vs another,
> etc

Remember that Ada was designed for large-scale software engineering
and therefore provides tools to:

- encode dependencies, this is what "with" clauses are for.

- minimize dependencies by means of information hiding.  Private child
packages are your friends.  You normally design large modules as
hierarchies of packages; the top-level package provides the public
interface for the module and the private children provide the
implementation.

- keep track of dependencies: this is what gnatmake is for.

- build and maintain cross-references: that's (also) what the .ali
files produced by the compiler are for, and gnatfind is your friend.

Directories are *not* a solution for these problems.  They do not
represent dependencies or hide any information from the compiler.
They do not help navigate the sources; specialized tools like
gnatfind, GPS or Emacs ada-mode do a better job with or without
directories, and general tools like grep work better without
directories.

The one situation where I find directories useful is when I want to
build some of my sources as a shared library.  In this case I place
these sources into a separate directory, build them separately, and
then install the shared library along with sources, .ali files and a
project file in a read-only directory where the rest of the software
looks for them.  This only works well if the shared library is mature
and stable (i.e. does not change very often anymore).

BTW, I too work on large-scale software (over 2 million lines of
sources) where directories normally contain hundreds of source files.

--
Ludovic Brenta.



  reply	other threads:[~2011-10-13 14:18 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12 23:38 organizing deep source trees with child packages Greg Moncreaff
2011-10-13  1:27 ` Yannick Duchêne (Hibou57)
2011-10-13  2:07   ` Greg Moncreaff
2011-10-13  3:52     ` Yannick Duchêne (Hibou57)
2011-10-13  3:55       ` Yannick Duchêne (Hibou57)
2011-10-13  4:21 ` Per Sandberg
2011-10-13  8:20 ` Stephen Leake
2011-10-13 13:19   ` Greg Moncreaff
2011-10-13 14:18     ` Ludovic Brenta [this message]
2011-10-13 22:25       ` Yannick Duchêne (Hibou57)
2011-10-14  1:44         ` Randy Brukardt
2011-10-14  2:40           ` Yannick Duchêne (Hibou57)
2011-10-16 12:38             ` Stephen Leake
2011-10-14  7:27         ` Dmitry A. Kazakov
2011-10-14  7:42           ` Yannick Duchêne (Hibou57)
2011-10-16 12:51           ` Stephen Leake
2011-10-16 13:43             ` Dmitry A. Kazakov
2011-10-16 18:51               ` Shark8
2011-10-16 19:19                 ` Ludovic Brenta
2011-10-17  7:04                   ` Simon Wright
2011-10-17  7:19                     ` Ludovic Brenta
2011-10-17  7:48                       ` Simon Wright
2011-10-17  7:56                         ` Ludovic Brenta
2011-10-17 10:27                           ` Simon Wright
2011-10-17 13:37                             ` Ludovic Brenta
2011-10-16 20:20               ` Yannick Duchêne (Hibou57)
2011-10-17  7:09               ` Simon Wright
2011-10-17  8:07                 ` Dmitry A. Kazakov
2011-10-18 11:12               ` Stephen Leake
2011-10-18 13:07                 ` Dmitry A. Kazakov
2011-10-18 16:55                   ` Simon Wright
2011-10-18 18:25                     ` Ludovic Brenta
2011-10-18 18:57                       ` Simon Wright
2011-10-18 22:00                         ` Bill Findlay
2011-10-19  6:28                           ` Simon Wright
2011-10-19  8:29                             ` Dmitry A. Kazakov
2011-10-19 11:52                               ` Yannick Duchêne (Hibou57)
2011-10-19 12:33                                 ` Dmitry A. Kazakov
2011-10-20 11:00                               ` Stephen Leake
2011-10-19 13:45                             ` Bill Findlay
2011-10-19  1:52                       ` Stephen Leake
2011-10-18 17:31                   ` Niklas Holsti
2011-10-18 18:38                   ` Ludovic Brenta
2011-10-19  1:55                     ` Stephen Leake
2011-10-19 10:41                     ` Dirk Craeynest
2011-10-19  1:51                   ` Stephen Leake
2011-10-19  9:03                     ` Dmitry A. Kazakov
2011-10-19  9:52                       ` Ludovic Brenta
2011-10-19 12:46                         ` Dmitry A. Kazakov
2011-10-19 16:43                           ` Ludovic Brenta
2011-10-19 20:01                             ` Yannick Duchêne (Hibou57)
2011-10-19 20:03                               ` Ludovic Brenta
2011-10-20 10:50                       ` Stephen Leake
2011-10-20 12:09                         ` Dmitry A. Kazakov
2011-10-14 11:55     ` Stephen Leake
replies disabled

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