Query: Is that "Release Number" really 2019G?
Pamoho opened this issue · 8 comments
I think we've jumped ahead a lot of IANA releases :-)
Cheers, Paul
Hey Paul, yeah I've noticed it yesterday and corrected the tag. Sleep deprivation :D
I might have missed something tough. Let me know if it's not fixed somewhere.
Thanks Alex,
Yeah I thought you must have been working flat out to get so much done in such a short time. ;-)
May I ask two supplementary questions?
- Should I be able to run TZcompile and create a valid TZdb.inc file? I can't see anywhere in TZschema.pas where the line for CIANAVersion declaration gets written.
Reason I was looking, was to work out what I need to do to update our stuff for melding new IANA Databases with your componentry. I did a dummy run and got a TZdb.inc file without the requisite line. (Easily reinstated from the Github download.
- How does the TZcompile process "know" what IANA DB it is processing in order to add the Version?
Cheers, Paul
P.S. At some future revision, you might consider adding your own Component's version number as a Property. [We show a "Made With" Dialog Box on demand in our Apps, and try to attribute ownership etc. with Version used, contact details etc. See Attached example.]
-pmh
Oops - closed too soon :-)
Hi @Pamoho,
Regarding the CIANAVersion - I use a shell script at the moment to automatically update the whole thing (including downloading the latest TZDB and CLDR).
-
TZCompile doesn't have access to such data yet so I'd need to extend it to accept a version number. Do you need to update this by hand? If you need this ability create a new issue and I'll look at extending the compiler with a new command line argument.
-
I'm afraid I do not understand what "Component's version number as a Property" means. My version number is
2.0
and the IANA DB is2019b
. And I combine them into one. Since compiled TZDB literally contains the IANA DB it makes sense to have such a version.
Thanks for giving attribution! That's very nice of you!
Alex.
That being said, I've added the argument and extended my shell script accordingly.
Now, only point 2 is open.
Sorry Alex, I was being very obscure!
Thanks for response to #1 - I'll have a look at it when time permits.
#2.
You have added "DbVersion" as a Public Function on the "TBundledTimezone" Component.
class function DbVersion: string;
Our "melding" Utility that takes an IANA release (say "tzdata2019b.tar.gz") and unzips it, compiles it, and then cleans up, finds the "infix" in the file name (say "2019b") and saves it in an include file. We've a custom version of "TZdb.pas" that references that file and adds:
/// pmh DB Version Properties function GetTZdbVersion : string; function GetTZdbComponentVersion : string;
/// <returns>The current IANA TZ DB version id as a short string property TZdbVersion : string read GetTZdbVersion; /// <returns>The current YAPB TZ DB version id as a short string property TZdbComponentVersion : string read GetTZdbComponentVersion;
/// pmh Version Constant data {$I ..\Src\TZDBPK\TZDB.inc} {$I pmhTZdbVers.inc} const consTZdbComponentVersion = '2.0.2019b'; //pmh '1.9.2019b'; //pmh '1.8.2018c'; //pmh '1.8.2014b';
"consTZdbComponentVersion" is currently manually updated when a new release of your Component is downloaded, and our customisation is reapplied, to reflect the major and minor version (e.g. 1.8, 1.9, 2.0). We usually take whatever "release number" you give on Github (e.g. 2019b) and don't change it if the IANA DB is updated by our "melding", since you haven't "endorsed" our combination! So it is possible for us to be using 1.8.2018c Timezone Component, with 2019a IANA Database, (as is one of our App's Release version).
The two Property "read" functions "GetTZdb*Version" just return the constant values from the ".inc" file etc.
Our Utility recompiles TZdb Unit and checks the data with a number of tools (see Attachment).
So as of v2.0 we no longer need our TZdbVersion Property / Function (can upgrade our "MadeWith" module to reference DbVersion) - assuming we can update it in TZdb.inc as and when a "meld" happens.
But it would be good not have to "fudge" the "2.0(.2019b)" when we report via "MadeWith" :-)
Hi Paul,
I understand now. I have added a new property called Version next to DbVersion. It gets updated by my build script now automatically.
You can now simply download the /dist/Tzdb.pas file which contains the other Inc files all combined (unless you still need to compile the tzdb yourself).
I haven't made a release yet so you can try the master branch code.
Let me know if that suits.
Thanks,
Alex.