Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-21403

Add Std.System.Util.PlatformVersionCheck function

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.2.0
    • Fix Version/s: 7.2.0
    • Component/s: ECL Standard Library
    • Labels:
      None

      Description

      Example code:

      IMPORT Std;
      
      t := '2018-01-30';
      f := '%Y-%m-%d';
      
      Std.Date.FromStringToDate(t, f);
      

      If above code is executed from a system running client tools 7.2.0 against a cluster running an older version of the platform, the cluster's compiler will fail compilation with errors similar to:

      Source	Severity	Code	Message	FileName	LineNo	Column	id
      eclcc	Error	2171	Object does not have a member named 'StringToSeconds'	/opt/HPCCSystems/7.2.0/clienttools/share/ecllibrary/std/Date.ecl	722	13	0
      eclcc	Error	2167	"Unknown identifier ""StringToSeconds"""	/opt/HPCCSystems/7.2.0/clienttools/share/ecllibrary/std/Date.ecl	722	13	1
      eclcc	Error	2171	Object 'std' does not have a member named 'Date'	/Users/campda01/Desktop/ECL/LexisNexis/Testing/BWR_Test3.ecl	6	5	2
      eclcc	Error	2167	"Unknown identifier ""Date"""	/Users/campda01/Desktop/ECL/LexisNexis/Testing/BWR_Test3.ecl	6	5	3
      eclcc	Error	2171	Object 'std' does not have a member named 'FromStringToDate'	/Users/campda01/Desktop/ECL/LexisNexis/Testing/BWR_Test3.ecl	6	10	4
      eclcc	Error	3001	Too many errors (max = 5); Aborting...	/Users/campda01/Desktop/ECL/LexisNexis/Testing/BWR_Test3.ecl	6	26	5
      eclcc	Info	3118	Mismatch in minor version number (7.2.0 v 7.0.8)		0	0	6
      

      The underlying problem is that Std.Date defines a new function (FromStringToSeconds) that in turn calls TimeLib.StringToSeconds() and that TimeLib function does not exist in older versions of the platform.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dcamper Dan S. Camper
                Reporter:
                dcamper Dan S. Camper
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: