pico-engine
pico-engine copied to clipboard
Uncertainty in UX when changing out a ruleset used as a module
Changes made to an application repo in this commit and the previous one (and some that follow) have revealed some odd behavior, and multiple issues.
Notice that we changed from
use module html
to
use module html.byu alias html
So, the using ruleset would need to be adjusted. And of course, the newer module ruleset would have to be installed in every pico with the using ruleset.
Just installing the new using ruleset didn't trigger recompilation, nor an error message saying the required module was missing. In fact, behavior continued as before, even though the hash of the ruleset reflected the change. And, trying to delete the older module ruleset was prohibited.
After some time, I noticed that other picos with the new using ruleset installed (but not the new module ruleset) began giving an error message like this (when a function requiring the module was invoked):
{"error":"Error: Ruleset byu.hr.core does not have query function \"index\""}
The error message is misleading because the ruleset does have the function. What is missing is the module ruleset in the pico.
To fix the error, I had to both
- install the new module ruleset
- uninstall and then install again the modified using ruleset -- just flushing the using ruleset wasn't enough
Fortunately, the using ruleset didn't have any entity variables. If it had, step 2 would have been onerous.