chore: fix deploy artifact path in example build scripts - #702
Open
MarkFeder wants to merge 1 commit into
Open
Conversation
Contributor
Greptile SummaryThe PR updates manual deployment commands in native and Pinocchio single-program examples to select the crate-named shared object rather than the nonexistent
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "chore: fix deploy artifact path in examp..." | Re-trigger Greptile |
The `build`/`deploy` npm scripts and cicd.sh deploy `program.so`, but `cargo build-sbf --sbf-out-dir=./program/target/so` emits an artifact named after the crate (e.g. `token_2022_transfer_fee_pinocchio_program.so`), so the documented `solana program deploy` step fails to find the file. Use a `*.so` glob so the deploy step resolves the built artifact regardless of its crate-derived name, across the single-program native and pinocchio examples. CI is unaffected (it builds to ./tests/fixtures and never runs deploy). Excluded: - The asm example (basics/transfer-sol/asm): it uses the sbpf toolchain with a different output layout and artifact name; it needs a separate fix. - Multi-program examples (basics/cross-program-invocation): their build emits more than one .so, so a single glob would pass multiple paths to `solana program deploy`, which takes one. Left unchanged.
MarkFeder
force-pushed
the
chore-fix-pinocchio-native-deploy-paths
branch
from
August 26, 2026 21:13
480649d to
11ef181
Compare
This was referenced Aug 29, 2026
Contributor
Author
|
@amilz could you take a look at this one when you get a chance? No open review threads left on it, so it is ready for maintainer review. It is one of 23 open Pinocchio ports I have up — they are independent and self-contained, so they can be reviewed and merged in any order: https://github.com/solana-developers/program-examples/pulls/MarkFeder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
build/deploynpm scripts andcicd.shin the native and pinocchio examples deployprogram.so:But
cargo build-sbf --sbf-out-dir=./program/target/sonames the output artifact after the crate, notprogram— e.g.token_2022_transfer_fee_pinocchio_program.so,transfer_tokens_program.so. So the documented deploy step fails with "No such file" becauseprogram.sonever exists there.Fix
Use a
*.soglob so the deploy step resolves the built artifact regardless of its crate-derived name:Each single-program build directory contains exactly one
.so, so the glob resolves unambiguously. Applied uniformly to bothcicd.shand thedeploynpm script across the affected single-program native and pinocchio examples (75 files).Notes
./tests/fixtures(viabuild-and-test) and never runsdeploy. Verified locally that the build emits the crate-named.soand the glob resolves to it.Excluded
basics/transfer-sol/asm) uses thesbpftoolchain, which has a different output layout and artifact name (its test loadstransfer-sol-cpi.so); it needs a separate fix.basics/cross-program-invocation): the build emits more than one.so, so a single*.soglob would pass multiple paths tosolana program deploy(which takes one). Left unchanged — itscicd.shalready deploys each program explicitly.This originated from a review comment on #701, where the same template line was flagged — fixing it repo-wide rather than diverging a single example.