metaplex-foundation / solita

Genrates an SDK API from solana contract IDL.
Apache License 2.0
140 stars 32 forks source link

[feat]: CLI needs to report errors that happen during IDL generation better #89

Closed thlorenz closed 2 years ago

thlorenz commented 2 years ago

Anchor encounters an error when generating IDL for candy-machine at this commit

The error is printed to the console, but solita assumes the IDL was generated properly and continues happily to generate code from the already existing IDL.

Instead it should report an error with a very visible message + return a non-zero error code instead. Additionally removing the IDL prior to running anchor or shank would make this problem more obvious and would make sure CI checking for changes to the IDL would properly report an error as well.