coral-xyz / anchor

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

Make error.rs its own crate #2764

Open kevinheavey opened 9 months ago

kevinheavey commented 9 months ago

I often find myself wanting the code in error.rs without needing the rest of the anchor_lang crate. It would be nice if there was an anchor-error crate to that end

acheroncrypto commented 9 months ago

The majority of dependencies of anchor-lang comes from solana-program and borsh crates, both of them seem to be imported from the error.rs file so I'm not sure about the benefits of splitting this into its own crate. What's the benefit of this other than a slight improvement of the compilation experience?

kevinheavey commented 9 months ago

If I could get Labs to split up solana-program, the anchor_lang build time would look much more significant 🙃