Hi, I'm thinking how to implement `can/try` in Rus...
# contribute
b
Hi, I'm thinking how to implement
can/try
in Rust and I'm wondering if you guys have any ideas for static languages (I've seen https://github.com/pulumi/pulumi/issues/18506 https://github.com/pulumi/pulumi/issues/18570). I'm wondering if converting the value to JSON and converting PCL accesses to JSON accesses would be enough or if more functionality is needed.
m
@bored-nightfall-11601 I'm not the best person to answer this, so take this with a grain of salt, but seems like a genuinely hard problem. I don't think it's been implemented in any static languages that i know of. But json value seems like it would work for a lot of cases.
b
Actually Gestalt is doing something like that
In Gestalt all the Outputs are in reality JSON's which are constantly encoded/decoded
The main issue is that what's can/try really used for - if it's only to check if fields exists - then we're fine- if it's for arbitrary commands - less so
m
Oh, I meant, i don't think its done in Pulumi in any static language. But yeah, agreed, if just checking existence, seems like that would work.