From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: organizing deep source trees with child packages
Date: Thu, 13 Oct 2011 04:20:12 -0400
Date: 2011-10-13T04:20:12-04:00 [thread overview]
Message-ID: <82ty7d1ewz.fsf@stephe-leake.org> (raw)
In-Reply-To: 21c9e6bb-f4f7-4a00-bde7-68f2c1a42d01@q13g2000vby.googlegroups.com
Greg Moncreaff <moncreg@gmail.com> writes:
> Have a 3 level (so far) tree of packages
>
> foo/bar/narf
>
> foo/foo.ads
> foo/bar/foo-bar.ads
> foo/bar/narf/foo-bar-narf.ads
> foo/bar/narf/foo-bar-narf-able.ads
> foo/bar/narf/foo-bar-narf-able.adb
> foo/bar/narf/foo-bar-narf-baker.ads
> foo/bar/narf/foo-bar-narf-baker.adb
> foo/bar/narf/foo-bar-narf-charlie.ads
> foo/bar/narf/foo-bar-narf-charlie.adb
>
> as you can see, the full paths of the items are visually silly, and
> somewhat painful if the tree needs refactoring
Drop the directory tree; use a flat directory with full file names:
foo/foo.ads
foo/foo-bar.ads
foo/foo-bar-narf.ads
foo/foo-bar-narf-able.ads
foo/foo-bar-narf-able.adb
foo/foo-bar-narf-baker.ads
foo/foo-bar-narf-baker.adb
foo/foo-bar-narf-charlie.ads
foo/foo-bar-narf-charlie.adb
> e.g. I would like something like
>
> foo/bar/narf/narf-able.ads
> foo/bar/narf/narf-able.adb
> foo/bar/narf/narf-baker.ads
> foo/bar/narf/narf-baker.adb
> foo/bar/narf/narf-charlie.ads
> foo/bar/narf/narf-charlie.adb
Is that better than my suggestion? If so, why?
In my view, directories are for very large groupings of files; I often
have hundreds of Ada files in one directory.
> foo/bar/narf/narf.ads could define
>
> package Narf renames Foo.Bar.Narf
I think this is a name conflict, but you could use:
package Narf_Local renames Foo.Bar.Narf
which is probably not worth it.
--
-- Stephe
next prev parent reply other threads:[~2011-10-13 8:20 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 [this message]
2011-10-13 13:19 ` Greg Moncreaff
2011-10-13 14:18 ` Ludovic Brenta
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