coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.36k stars 1.25k forks source link

idl: Make safety comment checks fail silently when program path env is not set #3045

Closed acheroncrypto closed 5 days ago

acheroncrypto commented 1 week ago

Problem

IDL generation expects ANCHOR_IDL_BUILD_PROGRAM_PATH environment variable to be set, but if the user is using Rust Analyzer with all features enabled, they will run into a panic due the environment variable not being set as described in https://github.com/coral-xyz/anchor/issues/3042.

Summary of changes

Make safety comment checks fail silently when the ANCHOR_IDL_BUILD_PROGRAM_PATH environment variable is not set.

Note that the checks still work as expected, this is only to improve an LSP related issue.

Resolves https://github.com/coral-xyz/anchor/issues/3042

vercel[bot] commented 1 week ago

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

acheroncrypto commented 1 week ago

Blocked by https://github.com/coral-xyz/anchor/issues/3044

acheroncrypto commented 5 days ago

Merging with (unrelated) CI errors because https://github.com/solana-labs/solana-program-library/issues/6897 is taking a while to get resolved.