The following code results in "error[E0433]: failed to resolve: use of undeclared crate or module __client_accounts_test_common
". I've seen other programs that use struct composition in this way and compile fine. Attempted changing the Anchor version, but it hasn't worked. Since the error comes from generated code I'm unsure the best way to proceed debugging. Any help appreciated :)
- Anchor: 0.28.0
- solana-cli 1.16.10 (src:382b3f16; feat:3712769919, client:SolanaLabs)
// instructions/mod.rs
pub mod test;
pub mod test_common;
pub use test::*;
pub use test_common::*;
// instructions/test_common.rs
use anchor_lang::prelude::*;
#[derive(Accounts)]
pub struct TestCommon<'info> {
#[account(mut)]
pub authority: Signer<'info>,
}
// instructions/test.rs
use anchor_lang::prelude::*;
use super::test_common::TestCommon;
#[derive(Accounts)]
pub struct Test<'info> {
test_common: TestCommon<'info>
}