You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel like this is a known issue. Maybe the IDL generation needs to do a better job at correctly accessing constants but not entirely sure what the solution looks like tbh.
I think it's not a critical problem to rewrite a code to use a regular constant instead of an associated one, but it can be very confusing for someone to find the culprit of this error. As a suggestion, maybe giving more meta information about a struct and field that causes IDL generation to fail would help locate a problem much more easily.
While fixing and improving IDL related generation stuff is a probably the number 3 anchor priority for me, I don't quite know when I'll be able to get to this. In the meantime PRs are welcome or maybe someone else more familiar with the IDL code could look into it.
Checked with
anchor-cli 0.24.2
In the case of the code below,
anchor build
successfully builds a contract, but on the IDL generation step build fails withIf the field of
does_not_work
is commented out, everything works.The text was updated successfully, but these errors were encountered: