Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple contracts in cargo workspace #1341

Open
nuke-web3 opened this issue Sep 24, 2023 · 1 comment
Open

Support multiple contracts in cargo workspace #1341

nuke-web3 opened this issue Sep 24, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@nuke-web3
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I want to use a single repository to house a set of independent contracts, and from the TLD I want to use cargo contract ... to execute on one or more of these contracts.

See:

Sadly as I must run cargo for each contract in the worspace, I have to rebuild the full target for each member. I want to share a target for this workspace, and a single lockfile for the whole project that I cannot do with the present construction without the manual --manifest-path that isn't as clean to use.

Describe the solution you'd like

With a workspace, cargo contract should iterate through each member and run on each in succession, by default, with perhaps a hint to use --manifest-path if you only want to run on one contract.

Alternatively detect the valid contract manifests and one of:

  1. allow me to select in a check box minimal TUI interface the ones I would like to run
  2. print the ones detected and the command to use to invoke the command for them (cargo contract ... --manifest-path ./...)

Describe alternatives you've considered

As #516 (comment) suggests, an error that is more helpful than ERROR: Cannot infer the root project id that is what happens now would be good enough, suggesting to use --manifest-path at least.

@nuke-web3 nuke-web3 added the enhancement New feature or request label Sep 24, 2023
@ascjones
Copy link
Collaborator

See also #182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants