coral-xyz / anchor

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

fix: avoid interference from rust tests during IDL generation #3058

Closed losman0s closed 5 days ago

losman0s commented 5 days ago

Problem

The test result/summary line from cargo test is used as delimiter to assign the content of the different IDL sections to the final idl variable. However that delimiter check is currently too loose and leads to some of the IDL sections being wiped when rust tests are present in the program crate.

Solution

This PR tightens the delimiter check to exclude other test results from wiping those sections.

vercel[bot] commented 5 days ago

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

A member of the Team first needs to authorize it.

losman0s commented 5 days ago

Thanks! Could you note this fix in the CHANGELOG?

Done