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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c6567772e9f3871d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: organizing deep source trees with child packages References: <21c9e6bb-f4f7-4a00-bde7-68f2c1a42d01@q13g2000vby.googlegroups.com> <82ty7d1ewz.fsf@stephe-leake.org> <3486b228-abdd-490f-b4ef-9ee6b19f65fa@gy7g2000vbb.googlegroups.com> Date: Fri, 14 Oct 2011 07:55:52 -0400 Message-ID: <8239evkcs7.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (windows-nt) Cancel-Lock: sha1:kSFAEYDx+tubbRasvwQJge2jHPg= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: ef79b4e982337e029e66130068 Xref: g2news1.google.com comp.lang.ada:21428 Date: 2011-10-14T07:55:52-04:00 List-Id: Greg Moncreaff writes: > On Oct 13, 4:20 am, Stephen Leake > wrote: >> >> Drop the directory tree; use a flat directory with full file names: >> >> >> In my view, directories are for very large groupings of files; I often >> have hundreds of Ada files in one directory. >> > > In this case the files have coherence at the leaf level (same > functional group, standard) > but the middle levels will change (new adds, old removes) > > 100's of files? unless it was auto generated from a domain model, No, all hand-written over several years. > how can you possibly keep it organized as to what depends on what, That's what "with" is for; the file names don't indicate that (and therefore your directory names don't either). > what is separable, I'm not clear what you mean my "separable". In one sense, every Ada file is already "separate". 'with' indicates everything needed for successful compilation, and therefore for successful operation. > reusable; There are some directories, just not nearly as many as you have. My GDS project looks like this: sal; reusable math and data structures opentoken; reusable common ; reusable base core infrastructure models standard modules hardware interfacing to real hardware (analog IO, digital IO) 1553 modules that send packets over 1553 spacewire modules that send packets over spacewire mission; mission specific combinations of sal, common 80% of the code is in sal, opentoken, common. each directory has a 'test' subdirectory. > what deals with one interface/component/ peer vs another, The file names don't really do that; how do you tell that gds-models-reaction_wheel-adcole needs to interface to gds-hardware-analog_out, but gds-models-reaction_wheel-gsfc needs to interface to gds-hardware-1553? In GDS, that information is implicit in the types of the input/output symbols declared by the modules (these are _not_ just Ada parameter lists, but items in a runtime symbol table). It is also stated in the GDS user guide. Repeating the file name in the directory name doesn't add any information. So how do you do this? The high level directory grouping is useful. Although if I was starting over, I'd move the 1553 and spacewire directories into the hardware directory; there's really no need to keep them separate. They were separate in the first place because I was not sure how complicated they would be when first starting on them, and because the tests were structured differently than the other hardware tests. But that difference has become less over time, as I've refactored things. Give me a specific example; when is repeating the file name in the directory name useful? What operation is possible/much more efficient on a directory with only a few files than on a directory with lots of files? Searching is easier in a flat directory; to find all of the files that mention "serial", I can just do 'grep' in the common/hardware directory. With your convention, I'd have to do 'find | grep'. Not a huge deal, but not necessary, either. Sometimes I have to do find | grep as well, since I do have some directories. Organizing the tests is simpler in flat directories; it's much easier to tell that you've got all the tests listed in the test harness. People can get used to anything; it's often hard to really analyze why we like a particular system, beyond "that's what I'm used to". -- -- Stephe