Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract Spec: Fill in more edge cases of macro code generation of types and fns #153

Open
leighmcculloch opened this issue Jun 24, 2022 · 8 comments
Assignees

Comments

@leighmcculloch
Copy link
Member

No description provided.

@leighmcculloch leighmcculloch self-assigned this Jun 24, 2022
@leighmcculloch leighmcculloch added this to the v0 milestone Jun 24, 2022
@leighmcculloch
Copy link
Member Author

@leighmcculloch leighmcculloch mentioned this issue Jul 6, 2022
12 tasks
@tomerweller tomerweller removed this from the v0 milestone Jul 8, 2022
@leighmcculloch
Copy link
Member Author

Also missing behavior is noted here too: #24 (comment)

This was referenced Jul 21, 2022
@leighmcculloch
Copy link
Member Author

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 leighmcculloch removed their assignment Sep 3, 2022
@sisuresh
Copy link
Contributor

@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.

@leighmcculloch
Copy link
Member Author

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.

@anupsdf
Copy link
Contributor

anupsdf commented Apr 8, 2024

Passing to @leighmcculloch to assess if anything more is needed here.

@leighmcculloch
Copy link
Member Author

There are quite a few TODO items still left in the soroban-sdk-macros crate that I think need addressing.

@leighmcculloch leighmcculloch removed their assignment Apr 9, 2024
@jayz22
Copy link
Contributor

jayz22 commented Apr 26, 2024

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?

  1. derive_enum_int.rs Add conversions to/from ScVal types. I think this was is already done.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@graydon @leighmcculloch @tomerweller @sisuresh @jayz22 @anupsdf and others