Hi all
I'm working lately with cross references in version 9.7 and 10.3. At the beginning I found it useful to know which elements are used by my start-up shell. Then I tried to apply it to the customer's real world (a repository from version 6). Useless. Everything is used by everything. And this statement is not true.
The problem appears because there are some common components that are re-used everywhere. In theory it should be no problem here because the referer only call a few operations of these common components. So, it is perfectly possible to know which descendants are currently used.
But then enter in scene Local Proc Modules. As far as I analyze it, there is no possibility to know who is calling local procs.
Let's say component Z have this code:
activate "A".DoB
And let's say A has 2 operations DoB, and DoC; and a local proc (and even a collection operation that activates "E").
;OPERATIONS operation DoB activate "B".exec() end operation DoC activate "C".exec() call LP_ExtraDoC end ;LOCAL PROC MODULES entry LP_ExtraDoC activate "D".exec() end
If I use cross references to know which dependencies have component Z, what I expected to get is: Z, A, and B (blue path in diagram). Of course, A is able to call B, C, D and E... but when doB is the enter point, none of C, D or E are currently needed.
Reading cross-references (in UXCROSS), I find the local procs definition. So, acording with the info in cross references I know that LP_ExtraDoC exists in component A, and also that calls operation exec of component D. But I don't find the way to know who is calling LP_ExtraDoC.
Another example, if I try to know dependecies of A.DoC, I am able to find a call to operation exec of component C. But there is no reference in cross-references to LP_ExtraDoc.
So, to be sure to include all dependencies, I have to add any local proc defined in any component. And this produces a nuclear reaction in real-world projects. In typical repositories with several startup-shells it is very common that subsystems are not really splited. In fact, there are a lot of interdependencies between them. It started someday when somebody wrote an activate to another subsystem and it worked and nobody say nothing.
Am I missing something?
Is there a way to call $ude("getReferenceList") to get a limited list of real referred items?
Note: in symbol table files it does appear who calls local procs. So that info exists in files (although not in UXCROSS).
Note2: if you call a non-existent local proc (call LP_I_DO_NOT_EXISTS) the compilation process includes the reference Operation DoC → LP_I_DO_NOT_EXISTS (as GlobalProc). As soon as mistake is corrected writing an existent local proc, this occurrence disappears. (Uniface 9.7.05.018)
Regards
