feat(cli): add --artifacts-path flag to override .so program location#573
feat(cli): add --artifacts-path flag to override .so program location#573procdump wants to merge 2 commits intosolana-foundation:mainfrom
Conversation
Allow overriding the default `target/deploy` path for .so artifacts with `--artifacts-path`. This enables loading debug-compiled programs during local development (e.g. `surfpool start --artifacts-path ./target/deploy/debug`). The flag conflicts with `--network` to prevent deploying debug builds to mainnet/devnet/testnet. Threads artifacts_path through framework detection, .so existence checks, in-memory template generation (bin_path injection), and the file watcher.
Allow overriding the default target/deploy path for .so program artifacts. Deployment always targets the local surfnet regardless of --network or --rpc-url, so no conflicts are needed.
|
Hmm, I just ran |
The change dates back to anza-xyz/agave#9263 . What you observe is most probably because you use cargo-build-sbf from stable. However with agave 4.x the path for debug builds is changed to |
Summary
cargo-build-sbf --debugemits artifacts intarget/deploy/debugon purpose to prevent accidental deployments on mainnet so in that sense:--artifacts-pathCLI flag to support loading debug-compiled.soprograms (e.g.surfpool start --artifacts-path ./target/deploy/debug)artifacts_paththrough framework detection,.soexistence checks, in-memory template generation, and the--watchfile watcherWhile working on this PR I've unearthed a calculation overflow bug in
txtx-addon-network-svm(details in the PR): solana-foundation/txtx#399