Repository navigation
0.6.1: build spl-token and spl-associated-token-account without entrypoints - #11
Merged
Merged
Conversation
Without no-entrypoint, each defines an entrypoint symbol, so a test binary linking kite and an Anchor program fails with duplicate symbol: entrypoint. Anchor's IDL build links the tests, so anchor build failed for compression/cnft-vault in solana-program-examples. kite only calls these crates' instruction builders; the token programs run inside LiteSVM. Claude-Session: https://claude.ai/code/session_014EotgxjmAGtATDFVnBtjXj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kite depends on
spl-token9 andspl-associated-token-account8 without theirno-entrypointfeature, so each defines anentrypointsymbol. A test binary that links kite and an Anchor program then has twoentrypoints and fails to link:Anchor's IDL build links the program's tests, so
anchor buildfailed forcompression/cnft-vaultin quicknode/solana-program-examples#198. Whether a given program hits it depends on which object files the linker pulls in, so any program's tests can break this way when kite is a dev-dependency.kite only calls these crates' instruction builders, and the token programs themselves run inside LiteSVM, so neither entrypoint is ever used.
Changes
Cargo.toml:spl-tokenandspl-associated-token-accountare built withfeatures = ["no-entrypoint"], with a comment saying why.Testing
cargo test: 2 unit, 30 integration and 26 doc tests pass.nmon the built libraries: before,libspl_tokenandlibspl_associated_token_accounteach definedentrypoint(T entrypoint). After, neither does.anchor buildin CI. That workaround, in the three compression examples, can go once 0.6.1 is published.🤖 Generated with Claude Code
https://claude.ai/code/session_014EotgxjmAGtATDFVnBtjXj
Generated by Claude Code