feat(contracts): auto-discover contracts via Makefile instead of workspace member list - #310
Open
Gpraiz01 wants to merge 6 commits into
Open
feat(contracts): auto-discover contracts via Makefile instead of workspace member list#310Gpraiz01 wants to merge 6 commits into
Gpraiz01 wants to merge 6 commits into
Conversation
- Add contracts/Cargo.toml workspace manifest for Soroban crates - Add contracts/Makefile with test, build, fmt, clippy targets - Add contracts/README.md documenting local test workflow - Add .github/workflows/contracts.yml limited to contracts/** changes
…Rng issue soroban-env-host is pinned transitively by soroban-sdk v22. Having it as a direct workspace dependency causes a rand/rand_core version mismatch that makes clippy fail with E0277 (CryptoRng trait not implemented).
…space member list Replace --workspace cargo commands with shell for-loops that discover all subdirectories containing a Cargo.toml. New contract crates are picked up automatically without editing the workspace members list. - Makefile: iterate over all contract dirs for build/test/fmt/clippy/check - CI: update cache key to cover all Cargo.lock files, bump timeout to 30m
|
@Gpraiz01 is attempting to deploy a commit to the cemayyildiz's projects Team on Vercel. A member of the Team first needs to authorize it. |
Adding [workspace] to 9 standalone contract crates so cargo fmt can run on them independently. Also runs cargo fmt across all crates to fix pre-existing formatting issues that were hidden when CI only checked the 4 workspace members. Crates with [workspace] added: amount_scale, asset_allowlist, auth_one_address, event_invoice_paid, fee_bps_clamp, meta_info, proof_meta, quittance_receipt_hash, seller_bind
- Remove leftover old-style clippy target that caused override warning - Run cargo fmt on event_invoice_created, expiry_check, memo_collision, network_passphrase - Update help text and add back all target to Makefile - All 28 crates now pass make fmt cleanly
CemAyyildiz
requested changes
Jul 29, 2026
CemAyyildiz
left a comment
Owner
There was a problem hiding this comment.
Review — changes requested (please do not close)
Thanks for the auto-discover Makefile idea — that part is useful for #229.
Blockers right now
- CONFLICTING against
main— please rebase first. - Too broad — this PR touches ~40 files across almost every contract crate (
[workspace]stanzas, formatting, clippy/test edits,Cargo.tomlchurn) in addition to Makefile/CI. - Shared files (
contracts/Makefile,.github/workflows/contracts.yml, rootcontracts/Cargo.toml) conflict easily with other Wave contract work.
What we need for merge
Keep this PR scoped to glue only:
contracts/Makefile(auto-discover loop).github/workflows/contracts.yml(cache /make testwiring)contracts/README.md(docs for the new targets)
Please drop unrelated per-crate edits from this PR (amount_scale, error_codes, status_transitions, quittance_receipt_hash, etc.). If a crate needs a [workspace] stanza or clippy fix for make test to pass, open that as a small follow-up PR per crate (or one tightly scoped “standalone crates compile under make” PR), not bundled here.
Ignore
- Vercel Authorization — infra on our side, not a code blocker.
Once rebased + slimmed, we will re-review and merge.
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.
Summary
Replaces
--workspacecargo commands in the Makefile with shell for-loops that auto-discover all contract crates by scanning subdirectories forCargo.toml. New contracts are picked up automatically — no more editing the workspace members list.Changes
contracts/Makefile: Iterates over all contract directories forbuild,test,check,fmt,clippy, andcleantargets. Usesstatus=1aggregation so all contracts are processed even if some fail..github/workflows/contracts.yml:contracts/**/Cargo.lock(covers all lock files)contracts/*/target(per-crate target dirs)Motivation
Previously, the Makefile used
--workspacewhich only operated on the 4 explicitly-listed workspace members. Adding a new contract required:contracts/Cargo.tomlworkspace membersThe new approach treats each contract crate independently — each uses its own dependency versions and is discovered automatically.
Closes #229