Closed godmodegalactus closed 11 months ago
If you're using local solana libraries, I think you'll need to do the same thing as the monorepo, by patching the spl dependencies to use your local sdk, ie:
thank u @joncinque saved us some copy-paste 😆
@joncinque I'm having the same issue but from running a client where I am importing solana-program and solana-sdk (they aren't stored locally). Is there a way to achieve the above considering I can't specify the path to "sdk/program" for the solana-program import?
@joncinque I'm having the same issue but from running a client where I am importing solana-program and solana-sdk (they aren't stored locally). Is there a way to achieve the above considering I can't specify the path to "sdk/program" for the solana-program import?
@stephenwilliams1990 , the patch approach should still work with solana dependencies with other non-crates-io sources, like github. Is that what you're using? If you have the patch statements and are still hitting errors, I recommend deleting your Cargo.lock (or if you don't want to do that, remove any entries for crates.io solana crates in the lockfile).
Thanks for responding @CriesofCarrots , the patch method ended up working fine here.
After anchor version changed, I got similar error.
Anyone experienced?
After anchor version changed, I got similar error.
Anyone experienced? may be it the code it should be taking pubkey from anchor_lang cargo clean then cargo update cargo add anchor-spl@0.29.0 too
Problem
Compiling a repository with a local or solana git repo is not possible because there is cyclic dependency between solana and solana-program-library.
Here is an example:
I have a project which uses some solana libraries like
solana-geyser-plugin-interface
,solana-transaction-status
and few more, and i want to compile it against my personal repository.When i do cargo build I get following error :
Here I have no dependency with
spl-token
orspl-token-2022
.This makes it hard to compile and test new solana features.
Proposed Solution
It am not against this cyclic dependency between both the projects but I believe that definitions that are in solana should stay in solana like
Pubkey
,Instruction
etc.