intersystems / ipm

InterSystems ObjectScript Package Manager
MIT License
27 stars 19 forks source link

v1 - #{objectscript-expression} syntax removed #498

Closed isc-tleavitt closed 1 month ago

isc-tleavitt commented 3 months ago

v0.7.x has, in %ZPM.PackageManager.Developer.Module:%Evaluate,

  Set regex = ##class(%Regex.Matcher).%New("#\{([^}]+)\}", tAttrValue)
  While regex.Locate() {
    Set expr = regex.Group(1)
    Set value = ..%EvaluateExpression(expr)
    Set $Extract(tAttrValue, regex.Start, regex.End - 1) = value
    Set regex.Text = tAttrValue
  }

    Quit tAttrValue
}

Method %EvaluateExpression(pExpr) As %String [ Internal ]
{
  Try {
    return @pExpr
  } Catch ex {
  }
  Return ""
}

This has been removed in v0.9.x, perhaps intentionally. Need to figure out if we're documenting or restoring this feature.

isc-tleavitt commented 1 month ago

Fixed in v1 by #556