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

InitSpace does not support tuple structs #3082

Closed
cryptopapi997 opened this issue Jul 13, 2024 · 3 comments
Closed

InitSpace does not support tuple structs #3082

cryptopapi997 opened this issue Jul 13, 2024 · 3 comments
Labels
bug Something isn't working lang

Comments

@cryptopapi997
Copy link
Contributor

cryptopapi997 commented Jul 13, 2024

If we try to derive InitSpace on a tuple struct, it will fail with the error Please use named fields in account structure. This is annoying, but the fact that the code seems to intentionally reject this case makes me wonder if there's a reason behind intentionally not supporting this?

Is there one or would you be open to a PR fixing this @acheroncrypto?

@acheroncrypto acheroncrypto added bug Something isn't working lang labels Jul 13, 2024
@acheroncrypto
Copy link
Collaborator

This is annoying, but the fact that the code seems to intentionally reject this case makes me wonder if there's a reason behind intentionally not supporting this?

It was intentional because Anchor did not support tuple structs during that time. It was added in v0.30 (#2824).

Is there one or would you be open to a PR fixing this @acheroncrypto?

I don't see any reason to not support this, go ahead.

@cryptopapi997
Copy link
Contributor Author

Sounds good, just opened a PR: #3084

@acheroncrypto
Copy link
Collaborator

Added in #3084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lang
Projects
None yet
Development

No branches or pull requests

2 participants