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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5894fe67040038b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-07 14:04:28 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!newshub.sdsu.edu!newspeer.cts.com!galanthis.cts.com!127.0.0.1.MISMATCH!not-for-mail Sender: kst@king.cts.com Newsgroups: comp.lang.ada Subject: Re: Attributes 'Version and 'Body_Version References: <9s9iti$g$1@nh.pace.co.uk> From: Keith Thompson Date: 07 Nov 2001 14:04:26 -0800 Message-ID: X-Newsreader: Gnus v5.7/Emacs 20.7 NNTP-Posting-Host: 209.68.192.180 X-Trace: 1005170666 nntp.cts.com 83334 209.68.192.180 Xref: archiver1.google.com comp.lang.ada:16017 Date: 2001-11-07T14:04:26-08:00 List-Id: "Marin David Condic" writes: > On my way to playing around with something else, I started looking at the > results of the attributes 'Version and 'Body_Version with Gnat 3.13p on > WinNT. They appear to be intended for distributed systems, but could > potentially be useful within any system that uses someone's library of > stuff - a means of verifying that any assumed behavior from a given version > is still valid. Or, for example, a means of recording the version of a > package that produced some particular output so that on input, version > differences can be accommodated. > > Looking at the strings from a particular package (a generic instantiatiation > at that) I see a pair of strings that look like: "2daafe2a" (spec) > "21adf138" (body) I didn't encounter anything in the ARM indicating what the > format of the string should be nor did I see anything in the GNAT documents > that explained how to interpret the string. Obviously, this is going to be > system dependent, but if you want to do anything more than say "This version > isn't the one I remember" you need to know how to interpret the string. Has > anybody used this before and possibly have some insight? Thanks. If you want to know which version is "older" or "newer", I can't think of any good way to define the concepts (other than perhaps the source file timestamp, but that can be changed by copying the file). Knowing whether a version is older or newer than the one you expected might be useful if you can assume upward compatibility, but that can't be enforced by the language; compatibility can be upward, downward, both, or neither, and may apply only to some features of a package. If you're looking for a configuration management system, I suggest using a configuration management system. If you want a version indication in your package that gives you more information than equality/inequality, it should be easy enough to add one yourself. (For example, if you use RCS or CVS, you can have a version string that's automatically updated whenever the source file is checked in.) The version strings used by GNAT look like they might be 32-bit checksums of the source, in hexadecimal, but that's just a guess. -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Cxiuj via bazo apartenas ni.