Closed b1conrad closed 3 years ago
Tried isolating the function in a ruleset. The function was copied from the original ruleset to eliminate the possibility of some obscure compiler error.
ruleset surrogate {
meta {
use module io.picolabs.pds alias pds
shares surrogate
}
global {
surrogate = function(){
stuff_names = [
"Last Name",
"Work Email",
"F/T-P/T Status",
]
stuff = stuff_names.map(function(n){
pds:getData("person",n)
}).join(":")
stuff
}
}
}
and this works fine.
However, I need it not in a separate ruleset, but in the ruleset which is already installed in every person pico.
Looked at the compile code of the ruleset, and everything looks fine, including the __testing
map.
So, this must be a UI issue. Maybe something about the name surrogate
?
No, how could it be a UI issue when it appears fine in a smaller ruleset?
Remains a mystery. I will try changing the name. And that worked.
Leaving this open in case someone wants a mystery to look into...
It has happened again. See these commits:
None of the experiments changed what showed in the Testing tab!
Working hypothesis is to look at step 2. What if I try deleting and then installing the ruleset again in the pico? It could be a difference between ruleset install and ruleset flush.
This is a serious problem because it interrupts the development cycle and draws attention away from what is being worked on to why the pico isn't behaving differently (i.e. has a different Testing tab) when a change is made to a ruleset.
Found the problem. The first commit added a dependency on a module which the pico did not have installed. So, flushing didn't actually change the ruleset in the pico, although it did report a new hash.
It would be helpful to programmers if the error was reported in the UI. Open issue #569 for this purpose.
I added a global function to a ruleset with its name added to the
shares
statement in themeta
section.Flushing the ruleset and visiting the Testing tab and the function does not show up on the Testing tab. Need a second pair of eyes on this, and or figure out how it is getting missed.