Repository navigation
Conversation
1 of 2 tasks
Contributor
[Medium impact] The PR appears safe to merge; no blocking issues were found. SummaryCorrects deployment paths in native Rust and Pinocchio examples so the scripts name the files their builds produce.
No new actionable issues found. Reviews (4) · Last reviewed commit: "chore: deploy the artifact the build wri..." · Reviewed by Greptile |
MarkFeder
added a commit
to MarkFeder/program-examples
that referenced
this pull request
Nov 10, 2026
pnpm runs package.json scripts through cmd.exe on Windows, which does not expand the *.so glob. Name the file cargo build-sbf writes instead, matching solana-foundation#794.
MarkFeder
added a commit
to MarkFeder/program-examples
that referenced
this pull request
Nov 10, 2026
pnpm runs package.json scripts through cmd.exe on Windows, which does not expand the *.so glob. Name the file cargo build-sbf writes instead, matching solana-foundation#794.
This was referenced Nov 10, 2026
The deploy npm script in the native and pinocchio examples ran 'solana program deploy ./program/target/so/program.so', but cargo build-sbf names the artifact after the crate (e.g. transfer_tokens_program.so), so the documented deploy step failed with 'No such file'. Each deploy now names <crate lib name>.so. A *.so glob would be shorter, but pnpm runs package.json scripts through cmd.exe on Windows, which passes globs through literally. Also: - four token-2022 native examples deployed hello_solana_program.so (copy-paste) - cross-program-invocation/native built into ./program/target/so and deployed program.so; it now builds into ./target/so and deploys both crate-named programs, chained with && (works in cmd.exe too) - counter/native README said 'pnpm deploy', which is pnpm's workspace command, not the script
MarkFeder
force-pushed
the
chore-fix-pinocchio-native-deploy-paths
branch
from
November 18, 2026 20:20
337e745 to
ad2221f
Compare
MarkFeder
added a commit
to MarkFeder/program-examples
that referenced
this pull request
Nov 18, 2026
pnpm runs package.json scripts through cmd.exe on Windows, which does not expand the *.so glob. Name the file cargo build-sbf writes instead, matching solana-foundation#794.
MarkFeder
added a commit
to MarkFeder/program-examples
that referenced
this pull request
Nov 18, 2026
pnpm runs package.json scripts through cmd.exe on Windows, which does not expand the *.so glob. Name the file cargo build-sbf writes instead, matching solana-foundation#794.
dev-jodee
approved these changes
Nov 20, 2026
MarkFeder
added a commit
to MarkFeder/program-examples
that referenced
this pull request
Nov 20, 2026
pnpm runs package.json scripts through cmd.exe on Windows, which does not expand the *.so glob. Name the file cargo build-sbf writes instead, matching solana-foundation#794.
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.
Linked issue
Fixes #787
Replaces #702, which the PR-hygiene bot closed before the issue was accepted; GitHub doesn't let the author reopen it.
What and why
The
deploynpm script in the native and Pinocchio examples ran:cargo build-sbf --sbf-out-dir=./program/target/sonames the artifact after the crate, notprogram(e.g.transfer_tokens_program.so), so the documented deploy step failed with "No such file".Each deploy now names the file the build actually writes,
<crate lib name>.so, taken fromcargo metadataand cross-checked against the fixture each example's tests load:A
*.soglob would be shorter, but pnpm runspackage.jsonscripts throughcmd.exeon Windows, which passes the glob through literally, so the explicit name is the form that works on every OS.Also fixed while checking every deploy path against its crate:
hello_solana_program.so(copy-paste).basics/cross-program-invocation/nativebuilt into./program/target/soand deployedprogram.so. It now builds into./target/soand deploys both crate-named programs, chained with&&(works incmd.exetoo).basics/counter/native/README.mdsaidpnpm deploy, which is pnpm's own workspace command, not the script; it now sayspnpm run deploy.Rebased onto #800, which removed the
cicd.shscripts, so this now only touchespackage.jsondeploy scripts and that README line.Testing
solana program deployin native/Pinocchiopackage.jsonwith<--sbf-out-dir>/<crate lib name>.sofromcargo metadata: 50 single-program examples, 0 mismatches (cross-program-invocation checked by hand).cargo build-sbffollowed bypnpm run deployfor every native/Pinocchio example, with a stand-insolanathat only acceptsprogram deploy <path>when the path is an SBF ELF the build produced. All passed; the same check fails on the old scripts.package.jsonscript under pnpm 10.33.0 receives./program/target/so/*.soliterally (file not found), while the explicit path and the&&chain resolve.prettier --checkpasses. CI doesn't rundeploy, so it is otherwise unaffected.AI disclosure
Check exactly one. See CONTRIBUTING.md.