Repository navigation
Conversation
[Low impact] The PR appears safe to merge; no actionable issues remain. SummaryReplaces the hardcoded
Reviews (3) · Last reviewed commit: "chore: fix deploy artifact path in examp..." · Reviewed by Greptile |
480649d to
11ef181
Compare
|
@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 |
|
@dev-jodee friendly ping, could you review this when you get a chance? CI is green and it's mergeable. Thanks! |
|
@dev-jodee gentle ping: this has been open since Aug 26 with no review. It's still green and mergeable, and I'm happy to rebase or change anything. These 3 are also what's blocking me from reopening the closed ports under the 3-PR limit. Thanks! |
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.
11ef181 to
c446ff3
Compare
|
Hi @MarkFeder, Thanks for the pull request. We ask that every change references an issue a maintainer has accepted, and there isn't one linked here. These examples are a teaching resource and each one has to stay small enough to read in one sitting, so whether a new example or framework flavor belongs here is worth settling before anyone writes it. Agreeing on the approach in an issue first means nobody writes code that can't be merged. See CONTRIBUTING.md for the full workflow. Please open an issue describing the change, or comment on the existing one. Once a maintainer has labelled it |
|
Superseded by #794 (the bot closed this one and GitHub won't let me reopen it). |
Linked issue
Fixes #787
What and why
The
deploynpm script andcicd.shin the native and Pinocchio examples run:cargo build-sbf --sbf-out-dir=./program/target/sonames the 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".This switches both to a glob, which resolves to the one artifact in each single-program example (75 files):
Left unchanged:
basics/transfer-sol/asmbuilds withsbpf, which uses a different output layout and artifact name; it needs its own fix.basics/cross-program-invocationbuilds more than one.so, andsolana program deploytakes a single path. Itscicd.shalready deploys each program explicitly.This came out of a review comment on #701, where the same template line was flagged; fixing it repo-wide keeps the examples consistent.
Testing
CI doesn't run
deploy(it builds into./tests/fixturesviabuild-and-test), so this doesn't affect CI. Verified locally thatpnpm buildemits the crate-named.soand the glob resolves to it, andprettier --checkpasses. After rebasing onto currentmain, no newer example still uses the old path.AI disclosure
Check exactly one. See CONTRIBUTING.md.