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

Using __TARGET_PLATFORM__ to conditionally compile sometimes results in syntax errors referencing attributes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None
    • Compatibility:
      Point

      Description

      Simplified example of a larger issue:

      I get the correct behavior if I comment the attribute reference (e.g., I see ‘thor’ or ‘not thor’ output when submitting the following code snip against the respective thor/hthor targets:

      #IF(_TARGET_PLATFORM_ in ['thorlcr'])
      Output('thor');
      // _Control.ThisCluster.LexIDCluster;
      #ELSE
      Output('not thor');
      #END

      But with the attribute reference uncommented, it gets a syntax error.

      Another note: if there is a prior reference outside the conditional compilation that references the same repo attribute, then it works OK too:

      _Control.IPAddress.prod_thor_sasha;

      #IF(_TARGET_PLATFORM_ in ['thorlcr'])
      Output('thor');
      _Control.IPAddress.prod_thor_dali;
      #ELSE
      Output('not thor');
      #END

      That runs successfully if the prior reference is provided and run against a thor target; fails if not.

        Attachments

          Activity

            People

            Assignee:
            jamesdefabia Jim DeFabia
            Reporter:
            kev77log Kevin Logemann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: