Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sdk-libs/account-pinocchio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ pub use light_sdk_types::interface::account::pack::Pack;
pub use light_sdk_types::interface::account::token_seeds::{
PackedTokenData, TokenDataWithPackedSeeds, TokenDataWithSeeds,
};
// create_accounts SDK function and parameter types
#[cfg(feature = "token")]
pub use light_sdk_types::interface::accounts::create_accounts::{
create_accounts, AtaInitParam, CreateMintsInput, PdaInitParam, SharedAccounts, TokenInitParam,
};
// Mint creation CPI types and functions
#[cfg(feature = "token")]
pub use light_sdk_types::interface::cpi::create_mints::{
Expand Down
5 changes: 5 additions & 0 deletions sdk-libs/account/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ pub use light_sdk_types::interface::account::pack::Pack;
pub use light_sdk_types::interface::account::token_seeds::{
PackedTokenData, TokenDataWithPackedSeeds, TokenDataWithSeeds,
};
// create_accounts SDK function and parameter types
#[cfg(feature = "token")]
pub use light_sdk_types::interface::accounts::create_accounts::{
create_accounts, AtaInitParam, CreateMintsInput, PdaInitParam, SharedAccounts, TokenInitParam,
};
Comment on lines +226 to +230
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Align create_accounts re-export gating with sdk-types.

light_sdk_types::interface::accounts::create_accounts only exists when both cpi-context and token features are enabled, but this re-export is gated on token alone. If a consumer enables token without cpi-context, this will fail to compile. Gate this re-export with both features or make token depend on cpi-context in Cargo features.

Run this to confirm the feature dependency chain:

#!/bin/bash
set -euo pipefail

# Scan all Cargo.toml files for feature wiring
fd -a 'Cargo.toml' | while read -r f; do
  if rg -n "cpi-context|token" "$f" >/dev/null; then
    echo "---- $f ----"
    rg -n "cpi-context|token" "$f"
  fi
done
🤖 Prompt for AI Agents
In `@sdk-libs/account/src/lib.rs` around lines 226 - 230, The re-export of
light_sdk_types::interface::accounts::create_accounts is currently gated only by
feature "token" but the symbol requires both "token" and "cpi-context"; update
the cfg on the pub use (the create_accounts, AtaInitParam, CreateMintsInput,
PdaInitParam, SharedAccounts, TokenInitParam re-export) to require both features
(e.g., cfg(all(feature = "token", feature = "cpi-context"))) so consumers
enabling only "token" won't hit a missing-symbol compile error; alternatively,
if you prefer feature wiring, add a Cargo feature dependency ensuring "token"
enables "cpi-context" in this crate's Cargo.toml.

// Mint creation CPI types and functions
#[cfg(feature = "token")]
pub use light_sdk_types::interface::cpi::create_mints::{
Expand Down
Loading