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: 103376,aea4cc77526f5e4a X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!bolzen.all.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!citadel.nobulus.com!newsfeed1.fi.sn.net!fi.sn.net!newsfeed2.fi.sn.net!news.song.fi!not-for-mail Date: Sat, 23 Feb 2008 15:03:46 +0200 From: Niklas Holsti User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060628 Debian/1.7.8-1sarge7.1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Separate Compilation in Programming Languages References: <47bf11df$0$14990$4f793bc4@news.tdc.fi> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <47c0154f$0$23852$4f793bc4@news.tdc.fi> Organization: TDC Internet Services NNTP-Posting-Host: laku61.adsl.netsonic.fi X-Trace: 1203770703 news.tdc.fi 23852 81.17.205.61:32901 X-Complaints-To: abuse@tdcnet.fi Xref: g2news1.google.com comp.lang.ada:20023 Date: 2008-02-23T15:03:46+02:00 List-Id: Dirk Heinrichs wrote: > Niklas Holsti wrote: > > >>Separate version tracking per subprogram (as mentioned by Dirk >>Heinrichs) could be an advantage, but I would prefer to get this >>from a subprogram-aware version control system, without the >>proliferation of source files that "separate" causes. > > > The only problem is that there is no subprogram-aware version control system > today. (My main job is doing SCM, btw., so I know what I'm talking about.) Agreed. (I did say I *would* prefer it, not that I *can* do it :-) Several years ago I implemented something of the sort, by writing some scripts to chop version "diff" reports per Ada subprogram, using fairly simple patterns to match the start and end of subprograms (greatly helped by a coding rule that forbade nested subprograms). The result showed version history per subprogram, and I found it very useful, especially for maintaining unit tests. > And IMHO there doesn't need to be one. It would have to know the syntax of > the program's language(s) to find out when particular subprograms change so > that it can raise their versions. That's next to impossible because people > always want to put something under version control which is written exactly > in the single one language the system isn't aware of. Well, it is a little like syntax coloring in editors, isn't it? Editors do it for the major languages, but not for every little language someone has invented. I admit that it is harder to identify subprogram boundaries than tokens and keywords, of course, and then there is the nesting problem. > So the solution is to keep putting just files under version control, and if > each of those files represent exactly one subprogram, your version control > _is_ (sort of) subprogram-aware, but still language independant. At the cost of a great number of files, and some language-specific means to combine the files into a program (eg. "is separate" for Ada). Ugh. Perhaps something could be done with a language-specific intermediate tool, similar to "gnatchop", that would mediate between the view that I want (one file per package, but version history per subprogram, or other segment of a file) and the view of the version control system. But in my context, the need is not so great. I'm just day-dreaming. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .