Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: Add checks for incorrect usage of idl-build feature #3061

Conversation

acheroncrypto
Copy link
Collaborator

Problem

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", ...]

Copy link

vercel bot commented Jun 28, 2024

@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 acheroncrypto merged commit f7916d4 into coral-xyz:master Jun 28, 2024
33 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant