Closed cryptopapi997 closed 1 month ago
When using it local or git version, you currently need to also build the CLI using the same way because of https://github.com/coral-xyz/anchor/pull/2946.
Edit: After further investigation I've found the place where it blows up: https://github.com/coral-xyz/anchor/blob/master/lang/syn/src/idl/external.rs#L21
That env variable should always be set using the latest CLI: https://github.com/coral-xyz/anchor/blob/e71a63cb7ae2eaefc4c2f31d04af140434ee0049/idl/src/build.rs#L98
Thank you!
If I have a type in an external program and I try to create a new type with it as part of it, I get
There's an easy way to recreate this:
IDL for external program:
Code for program importing it:
Trying to build this throws the above error.
Edit: Upon further investigation, this doesn't happen if we do
idl-build = []
. Edit: After further investigation I've found the place where it blows up: https://github.com/coral-xyz/anchor/blob/master/lang/syn/src/idl/external.rs#L21