Skip to content

Bump generated clients and their dependencies#75

Open
lorisleiva wants to merge 3 commits intomainfrom
loris/bump-client-dependencies
Open

Bump generated clients and their dependencies#75
lorisleiva wants to merge 3 commits intomainfrom
loris/bump-client-dependencies

Conversation

@lorisleiva
Copy link
Copy Markdown
Member

@lorisleiva lorisleiva commented Apr 20, 2026

See self-review below.

Copy link
Copy Markdown
Member Author

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

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

There is a lot of noise in this PR so allow me to highlight the changes that are significant enough to review.

Comment thread clients/js/package.json
Comment on lines -47 to +53
"@solana/kit": "^6.1.0"
"@solana/kit": "^6.4.0"
},
"devDependencies": {
"@solana/eslint-config-solana": "^6.0.0",
"@solana/kit-client-rpc": "^0.6.0",
"@solana/kit": "^6.1.0",
"@solana/kit-plugin-rpc": "^0.10.0",
"@solana/kit-plugin-signer": "^0.10.0",
"@solana/kit": "^6.4.0",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Bumping Kit and Kit plugins

Comment thread clients/js/test/_setup.ts
Comment on lines -17 to 26
export const createClient = () => {
return createLocalClient().use(systemProgram());
export const createTestClient = () => {
return createClient()
.use(generatedSigner())
.use(solanaLocalRpc())
.use(systemProgram())
.use(airdropSigner(lamports(1_000_000_000n)));
};
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changing the way we construct our test client to match latest Kit Plugin API.

Comment thread clients/rust/Cargo.toml
Comment on lines 10 to -31
[features]
fetch = ["dep:solana-client", "dep:solana-sdk"]
fetch = ["dep:solana-client"]
test-sbf = []
serde = ["dep:serde", "dep:serde_with", "kaigan/serde"]

[dependencies]
borsh = "^0.10"
kaigan = "^0.3"
borsh = "^1.0"
num-derive = "^0.4"
num-traits = "^0.2"
serde = { version = "^1.0", features = ["derive"], optional = true }
serde_with = { version = "^3.0", optional = true }
solana-client = { version = "2.3.4", optional = true }
solana-sdk = { version = "2.2.1", optional = true }
solana-program = "2.2.1"
solana-account = "~3.0"
solana-account-info = "~3.1"
solana-address = { version = "~2.4", features = [
'borsh',
'copy',
'curve25519',
'decode',
] }
solana-client = { version = "^3.0", optional = true }
solana-cpi = "~3.1"
solana-decode-error = "~2.3"
solana-instruction = "~3.2"
solana-program-error = "~3.0"
spl-collections = { version = "^0.1", features = ["borsh"] }
thiserror = "^1.0"
solana-account = "~2.2"
solana-account-info = "~2.3"
solana-instruction = "~2.3"
solana-program-error = "~2.2"
solana-pubkey = { version = "~2.4", features = ["curve25519", "borsh"] }
solana-cpi = "~2.2"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Update client dependencies to match latest Rust renderer code.

Comment thread codama.json
"anchorTraits": false,
"formatCode": true,
"toolchain": "+nightly-2025-02-16"
"toolchain": "+nightly-2026-01-22"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Update Rust toolchains (matching stake program).

Comment thread package.json
Comment on lines -4 to +7
"@codama/renderers-js": "^2.0.2",
"@codama/renderers-rust": "^2.0.0",
"@codama/renderers-js": "^2.2.0",
"@codama/renderers-rust": "^3.0.0",
"@solana/prettier-config-solana": "0.0.6",
"codama": "^1.5.0"
"codama": "^1.6.0"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Update Codama and JS/Rust renderers to the very latest stable versions.

Comment thread rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.86.0"
channel = "1.93.0"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Update Rust toolchains (matching stake program).

Comment thread vars.env
Comment on lines -1 to +2
RUST_TOOLCHAIN_NIGHTLY="nightly-2025-02-16"
SOLANA_CLI_VERSION="2.3.4"
RUST_TOOLCHAIN_NIGHTLY="nightly-2026-01-22"
SOLANA_CLI_VERSION="3.1.8"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Update Rust toolchains and Solana version (matching stake program).

@lorisleiva lorisleiva marked this pull request as ready for review April 20, 2026 13:12
@lorisleiva lorisleiva requested a review from joncinque April 20, 2026 13:12
@lorisleiva
Copy link
Copy Markdown
Member Author

@trevor-cortex

Copy link
Copy Markdown

@trevor-cortex trevor-cortex left a comment

Choose a reason for hiding this comment

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

Summary

Regenerates the JS + Rust clients against newer Codama renderers and bumps the dependency surface:

Rust client (breaking)

  • PubkeyAddress across all generated accounts/instructions (SDK v3 rename; solana-pubkey replaced by solana-address).
  • borsh 0.10borsh 1.0.
  • solana-client moves to ^3.0; other solana-* sibling crates move to ~3.x.
  • kaigan::U64PrefixStringspl_collections::U64PrefixedStr; kaigan dependency dropped.
  • solana-sdk dependency dropped entirely (the fetch feature now only pulls in solana-client).
  • The serde feature is removed. All #[cfg_attr(feature = "serde", derive(...))] attributes on generated accounts/instruction-data/enum types are gone, and the serde / serde_with deps along with the feature declaration are stripped from Cargo.toml.

JS client

  • @solana/kit peer dep ^6.1.0^6.4.0.
  • @solana/kit-client-rpc replaced by @solana/kit-plugin-rpc + @solana/kit-plugin-signer.
  • Test harness rewritten around createClient().use(...) composition with solanaLocalRpc, generatedSigner, and airdropSigner.
  • systemProgram() plugin now uses extendClient(...) and returns Omit<T, 'system'> & { system: SystemPlugin } — good change, prevents silently clobbering an existing system key on the client.
  • Minor renderer-driven tweaks: process.env.NODE_ENVprocess.env['NODE_ENV'] (stricter TS), explicit ReadonlyUint8Array return type on discriminator helpers.

Toolchain

  • Rust stable 1.86.01.93.0, nightly pinned to 2026-01-22, Solana CLI 2.3.43.1.8.

Things to watch

  1. Serde feature removal is a breaking API change for downstreams. Anyone consuming solana-system-client with features = ["serde"] will now get an unknown-feature error. Worth making sure the release notes / changelog entry for the next publish calls this out prominently alongside the borsh 1.0 and SDK v3 bumps. If dropping serde wasn't intentional (e.g. it disappeared because the new renderers-rust@3 no longer emits those attrs by default), it might be worth restoring via a renderer option so existing consumers aren't forced off.
  2. solana-address = "~2.4" alongside ~3.x siblings looks odd but is correct — solana-address is versioned independently in the solana-sdk monorepo and 2.4 is the current major. Not a bug, just noting it for subsequent reviewers who might flag it.
  3. Cargo.toml formatting: the [dependencies] block uses a mix of 2-space indentation inside the solana-address features array and default indentation elsewhere — minor, but cargo fmt / rustfmt won't touch Cargo.toml, so this is manual.
  4. JS createTestClient is no longer async. All the test call sites still await createTestClient(), which works (awaiting a non-thenable is a no-op) but is now misleading. Either drop the awaits or keep the function returning a promise for forward-compat with plugins that may need async init.
  5. Test coverage of the plugin change: systemProgram()'s new extendClient + Omit<T, 'system'> return type isn't exercised by a test that actually has a prior system key on the client, so the anti-clobber guarantee is type-checked but not runtime-verified. Probably fine given this is a thin generated wrapper.

Notes for subsequent reviewers

  • The bulk of the diff is mechanical PubkeyAddress / pubkey!address! rewrites across generated files — safe to skim once you've spot-checked one or two instruction files.
  • Worth running cargo build --all-features and cargo build --no-default-features locally (or confirming CI does) to make sure the fetch feature still compiles cleanly without solana-sdk in the tree.
  • Verify CI actually picks up the new nightly 2026-01-22 — if the toolchain isn't cached on the runners the first build will be slow, not broken.
  • Confirm @solana-program/system consumers downstream (other solana-program repos, spl-token-related packages, docs examples) are ready for the Kit 6.4 peer-dep bump before publishing.

Copy link
Copy Markdown
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great!

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.

3 participants