fission-codes / fission

Fission CLI & server
https://runfission.com/docs
119 stars 14 forks source link

Bugfix: `fromRawContent` can never succeed #610

Closed expede closed 2 years ago

expede commented 2 years ago

@bgins and I ran into this problem while working on #606. The core thing is that it's impossible to actually construct a UCAN from a RawContent without also having a Signature, so fromRawContent could never succeed.

UCAN.RawContent -> Either Resolver.Error (UCAN fct rsc ptc) -- 😾 How get signature?

I also bubbled some error content through while I had the hood up.

TODO

The one thing that isn't covered here is if UCAN.parse should automatically add quotes to make the JSON parsing work internally. I think not, but perhaps it would be less surprising with them?

bgins commented 2 years ago

@expede is this ready to be merged?