People sometimes incorrectly enable idl-build feature by default e.g.
[dependencies]
anchor-lang = { version = "0.30.1", features = ["idl-build"] }
This is not the intended usage, as it results in unnecessary compilation and unrelated stack errors.
Summary of changes
Add a warning in CLI that specifically checks for the above case, and show how to fix it:
WARNING: `idl-build` feature of crate `anchor-lang` is enabled by default. This is not the intended usage.
To solve, do not enable the `idl-build` feature and include crates that have `idl-build` feature in the `idl-build` feature list:
[features]
idl-build = ["anchor-lang/idl-build", ...]
Problem
People sometimes incorrectly enable
idl-build
feature by default e.g.This is not the intended usage, as it results in unnecessary compilation and unrelated stack errors.
Summary of changes
Add a warning in CLI that specifically checks for the above case, and show how to fix it: