koinos / koinos-sdk-as

AssemblyScript (AS) Software Development Toolkit (SDK) for the Koinos Blockchain
https://roaminroe.github.io/koinos-as-sdk/
MIT License
5 stars 3 forks source link

[BUG]: Using optional fields fails to build #73

Closed mvandeberg closed 8 months ago

mvandeberg commented 8 months ago

Is there an existing issue for this?

Current behavior

When building a contract that declares proto fields as optional, the build fails.

While all fields are optional in proto3, adding the optional keyword causes the generation of helper functions (e.g. has_field). This is not required but does improve code readability and should be supported.

The protoc invocation in koinos-proto adds the argument --experimental_allow_proto3_optional, which appears to be omitted from the SDK invocation. Adding this argument should allow those builds to succeed.

Expected behavior

No response

Steps to reproduce

No response

Environment

No response

Anything else?

No response