Skip to content

Commit

Permalink
deprecate profile:data
Browse files Browse the repository at this point in the history
  • Loading branch information
b1conrad committed Sep 9, 2023
1 parent 1d3ef57 commit 10dd741
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions krl/io.picolabs.plan.connect.krl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ruleset io.picolabs.plan.connect {
</form>
<ul>
#{did_map.keys().map(function(k){
//TODO name = wrangler:picoQuery(k,"io.picolabs.plan.profile","name",{})
fails_name = wrangler:picoQuery(k,"io.picolabs.plan.profile","name",{})
.klog("fails_name") // TODO
name = wrangler:picoQuery(k,"io.picolabs.wrangler","name",{}) // fallback
title = name => << title="#{name}">> | ""
<<<li><span#{title}>#{k.elide()}</span> : #{did_map.get(k).elide()}</li>
Expand Down Expand Up @@ -116,7 +117,7 @@ document.getElementById("diddoc").value
rule initializeAgentLabel {
select when io_picolabs_plan_connect factory_reset
pre {
name = profile:data(){"name"}
name = profile:name()
}
fired {
ent:agentLabel := name
Expand Down
2 changes: 1 addition & 1 deletion krl/io.picolabs.plan.profile.krl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ruleset io.picolabs.plan.profile {
use module io.picolabs.pds alias pds
use module io.picolabs.wrangler alias wrangler
shares profile, name
provides data
provides data, name
}
global {
cell_attrs = function(prompt){
Expand Down

1 comment on commit 10dd741

@b1conrad
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fails_name doesn't fail!

It appears that providing the name function allows it to be called through wrangler:picoQuery working through the DID. This is the case that works for pico engine issue #647.

Please sign in to comment.