Skip to content

fix(abl-token): revive orphaned litesvm test - #665

Merged
dev-jodee merged 1 commit into
solana-foundation:mainfrom
NikkiAung:fix/revive-abl-token-litesvm-test
Aug 4, 2026
Merged

fix(abl-token): revive orphaned litesvm test#665
dev-jodee merged 1 commit into
solana-foundation:mainfrom
NikkiAung:fix/revive-abl-token-litesvm-test

Conversation

@NikkiAung

Copy link
Copy Markdown
Contributor

Summary

tokens/token-2022/transfer-hook/allow-block-list-token/anchor/tests-rs/test.rs was moved out of programs/abl-token/tests/ with a comment saying it would move back once anchor-lang reached "0.33+ on solana 3.x" (to resolve a litesvm/solana-account-info version conflict). anchor-lang is already at 1.0.2 (resolves to 1.1.2), but nobody moved the test back — tests-rs/ isn't referenced by any Cargo.toml, CI workflow, or script, so this test has been silently dead (not compiling, not running anywhere) since the anchor upgrade.

Moving it back surfaces the real, current, unrelated blocker: the test imports spl_token_2022::ID directly, which resolves through spl-token-2022 9.0.0 → solana-pubkey 2.4.0 — a different Pubkey type than every other dependency here (anchor-lang, litesvm, solana-keypair) resolves to (the solana-address 2.7.0 family, via solana-pubkey 3.x/4.x's pub use ... as Pubkey re-export). Anchor's generated ToAccountMetas struct reports this as expected Address, found solana_pubkey::Pubkey — not a real Address/Pubkey type split (there isn't one), just two incompatible majors of the same crate colliding.

anchor-spl (already a normal dependency) already made this exact migration, so swapping to anchor_spl::token_2022::ID fixes it with no new crate needed.

Also removes the now-unused pubkey macro import and the stale tests-rs/README.md, which described the already-resolved 0.32.1 conflict.

Scope note: this restores the test to its historical CI status — it was never enforced by the Anchor CI workflow even before it broke (that workflow only runs anchor test's TypeScript/mocha suite, not cargo test directly for any Anchor program in this repo), so this is a restoration, not new CI coverage. Happy to also wire it into this program's Anchor.toml test script if that's wanted, but didn't want to introduce a new repo-wide pattern unprompted.

Test plan

  • cargo check --manifest-path programs/abl-token/Cargo.toml --tests — clean
  • anchor build — succeeds, produces target/deploy/abl_token.so
  • cargo test --manifest-path programs/abl-token/Cargo.toml — both tests pass:
    running 1 test
    test test ... ok
    
  • Confirmed no other reference to tests-rs/ anywhere in the repo (CI, scripts, docs)

tests-rs/test.rs was moved out of programs/abl-token/tests/ with a
comment saying it would move back once anchor-lang reached "0.33+ on
solana 3.x" to resolve a litesvm/solana-account-info version
conflict. anchor-lang is already at 1.0.2 (resolves to 1.1.2), but
nobody moved the test back — tests-rs/ isn't referenced by any
Cargo.toml, CI workflow, or script, so this test has been silently
dead (not compiling, not running anywhere) since the anchor upgrade.

Moving it back surfaces the real, current, unrelated blocker: the
test imports spl_token_2022::ID directly, which resolves through
spl-token-2022 9.0.0 -> solana-pubkey 2.4.0, a different Pubkey type
than every other dependency here (anchor-lang, litesvm,
solana-keypair) resolves to (the solana-address 2.7.0 family, via
solana-pubkey 3.x/4.x's `pub use ... as Pubkey` re-export). Anchor's
generated ToAccountMetas struct reports this as "expected Address,
found solana_pubkey::Pubkey" - not a real Address/Pubkey type split,
just two incompatible majors of the same crate colliding.

anchor-spl (already a normal dependency) already made this exact
migration, so swapping to anchor_spl::token_2022::ID fixes it with no
new crate needed. Verified: cargo check --tests is clean, anchor
build produces the .so, and cargo test passes both tests.

Also removes the now-unused `pubkey` macro import and the stale
tests-rs/README.md, which described the already-resolved 0.32.1
conflict.

This restores the test to its historical CI status: it was never
enforced by the Anchor CI workflow even before it broke (that
workflow only runs `anchor test`'s TypeScript suite, not `cargo
test`), so this is a restoration, not new CI coverage.
@NikkiAung
NikkiAung requested a review from dev-jodee as a code owner August 4, 2026 08:32
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Restores the orphaned LiteSVM integration test to the abl-token crate now that the prior Anchor dependency conflict is resolved.

  • Adds the Solana and LiteSVM packages required to compile the Rust integration test.
  • Uses Anchor SPL’s Token-2022 program ID to keep account-meta public-key types compatible.
  • Removes the obsolete temporary-location documentation and comments.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code failure identified.

The restored test resolves its program artifact at the expected Anchor deployment path, and the Token-2022 ID now comes from the same Anchor SPL dependency family used by the program accounts.

Important Files Changed

Filename Overview
tokens/token-2022/transfer-hook/allow-block-list-token/anchor/programs/abl-token/Cargo.toml Adds test-only LiteSVM and modular Solana dependencies needed by the restored integration test.
tokens/token-2022/transfer-hook/allow-block-list-token/anchor/programs/abl-token/tests/test.rs Restores the Rust integration test under Cargo’s conventional test directory and aligns the Token-2022 ID with Anchor’s public-key type.
tokens/token-2022/transfer-hook/allow-block-list-token/anchor/tests-rs/README.md Removes documentation for the obsolete temporary test location and resolved dependency conflict.

Reviews (1): Last reviewed commit: "fix(abl-token): revive orphaned litesvm ..." | Re-trigger Greptile

@dev-jodee
dev-jodee merged commit 6c59f0d into solana-foundation:main Aug 4, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants