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

anchor-spl with metadata feature fails to compile without token and associated_token #3291

Open
lincot opened this issue Oct 2, 2024 · 1 comment
Labels
bug Something isn't working spl

Comments

@lincot
Copy link

lincot commented Oct 2, 2024

Running cargo build --no-default-features --features metadata results in a compilation failure because src/metadata.rs uses spl_token::ID and spl_associated_token_account::ID.

An easy way to fix this would be to make the metadata feature dependent on token and associated_token. However, adding associated_token introduces 71 new dependencies that are not always needed. A more efficient approach would be to define the program pubkeys directly.

@acheroncrypto acheroncrypto added spl bug Something isn't working labels Oct 3, 2024
@acheroncrypto
Copy link
Collaborator

Rather than hardcoding it ourselves, it might be better to use the new spl-associated-token-account-client crate which only depends on solana-program.

anchor-spl doesn't scale well because of problems like this one. Long term, I'm considering removing all its dependencies, or maybe even getting rid of anchor-spl altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spl
Projects
None yet
Development

No branches or pull requests

2 participants