Open leighmcculloch opened 2 years ago
Also missing behavior is noted here too: https://github.com/stellar/rs-stellar-contract-sdk/issues/24#issuecomment-1180899140
I'm going to move this to the August iteration and just accept that the edge cases not covered are just that, not covered right now.
@leighmcculloch Should this issue still be open? Th contract spec code has changed quite a bit so it's not clear to me what needs to be done here.
Yup. There's plenty of little edge cases where errors show up. @brson just ran into some recently and was opening PRs for the ones he saw.
Passing to @leighmcculloch to assess if anything more is needed here.
There are quite a few TODO items still left in the soroban-sdk-macros
crate that I think need addressing.
Here are the outstanding TODOs in the soroban-sdk-macros, most of them are pretty old. @leighmcculloch can you take a look at them and give guidance on whether they are still applicable/needed?
derive_enum_int.rs
Add conversions to/from ScVal types. I think this was is already done. derive_enum.rs
Choose discriminant type based on repr type of enum.. Not sure if still applicable. Seems to be describing enum int, but also not sure what's the benefit.derive_enum.rs
Use attributes tagged on variant to control whether field is included.. Not sure what's the use case. An example would be nice. derive_struct.rs
Add field attribute for including/excluding fields in types.. Same as above, not sure why it is needed. Explanation with example would be helpful. derive_struct.rs
Better handling of partial types and types without all their fields and types with private fields.. Need more specifics on how partial private fields should be handled. lib.rs
Use imp.trait_ in generating the client ident, to create a unique client for each trait impl for a contract, to avoid conflicts.map_type.rs
Implement conversion to VecM from iters to omit this collect.. This needs to done on the rs-stellar-xdr to add the convert from iter to VecM, don't feel it's worth it to save one line of macro code here (unless the same pattern is used a lot elsewhere).
Lots of TODOs in this file: https://github.com/stellar/rs-stellar-contract-sdk/blob/main/macros/src/derive_type.rs