OBuild - parser errors
Working with OBuild, I've noticed something that I'm seeking guidance on whether this is a known issue/limitation, or whether perhaps some coding practices need review.
For quite some time, OScript has permitted referencing objects/functions using notation such as LLIAPI::APIObjects::PrgSession.GetPrgCtx. (I seem to recall a PPT similar to the old "Deep Dive" topics covering introduction, but cannot seem to find).
Alternately, a format $LLIApi.CacheUtil.Update is also valid.
I have a vague recollection that the first of these syntaxes when referencing objects is now the preferred way.
However, it appears that if the base Content Suite install that OBuild is connected to doesn't have the OSpace being referred to (using the first of these formats) installed/loaded that OBuild reports parse errors - but only where the relevant reference doesn't exist in the OSpace being built.
By way example, we have a module and it comprises a number of OSpaces - lets refer to these as "Master", "FunctionA" and "FunctionB".
This module is not installed in my base CS instance that OBuild is connected to.
I have a utility function declared in "Master" that is used by all three OSpaces.
In "Master", when I refer to this using MASTER::MasterUtils::Utils.FunctionX, OBuild is fine.
But when "FunctionA" or "FunctionB" utilise the same reference, OBuild will report something like:
OBUILD ERROR parseError Unknown object MASTER::MasterUtils::Utils : /tmp/src/modulename/FunctionA/utils.os : n : n: n
Ideally in my mind, the parser would check if the scope of the compilation being performed covers the reference.
The easiest fix is to replace references the MASTER::MasterUtils::Utils.FunctionX syntax with the equivalent $MASTER…. notation.
However, this in my view defeats purpose of using the "::" reference, which is to "trap" at compile time situations where a developer has made a reference to an invalid object - something the $ notation doesn't do (i.e. as incorrect references using this form are only identifiable at runtime!)
Are there any options in immediate term (other than changing reference format), or plans to address this going forward?
PS - my other goal with trying to standardise to the "::" reference notation is that longer term I want to look at scripting some form of check against the "OScript changes" file that OT produce for each release and that captures details of changed/added/removed objects. In fact this would be a great value add for OBuild, as you could report that as part of the build output so that the developer is advised of any references to core code being made and where it may be impacted by changes. In fact, this further in my mind cements the reason we should be using the "::" reference, as this would mean any reference to a removed object would result in a compile failure bringing those situations to attention, something the $ reference notation would "miss".
- All Categories
- 102 Developer Announcements
- 50 Articles
- 89 General Questions
- 118 IM Services
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.8K Extended ECM
- 893 Cloud Fax and Notifications
- 75 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 90 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
OpenText CE Products
Docs & APIs