clarinet icon indicating copy to clipboard operation
clarinet copied to clipboard

Clarinet `requirements add` handling arguments weakly

Open mefrem opened this issue 2 years ago • 1 comments

Currently, Clarinet can add a project contract requirement by passing a principal contract in the cli like so:

clarinet requirements add SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait

What's not yet supported is passing trait references, like: clarinet requirements add SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait

Furthermore, as a bonus: It would be great to clarity or correct this hint/help text returned clarinet requirements add --help

Screenshot 2023-02-09 at 3 26 39 PM

Currently, passing clarinet requirements add "SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait" (note the double quotes, like as indicated in the help dialog) does not yield a correctly imported requirement. I had to pass the principal contract reference with no double quotes (or even the single quote prefix which is the Clarity type convention). The request to this issue would be to have a better help dialog without the quotes, or have an input formatter that can take a principal contract reference (or trait reference) with any style or quantity of quotes and find the correct contract on the Stacks chain to place inside the requirements-publish contract for the deployment plan.

mefrem avatar Feb 09 '23 21:02 mefrem

My approach for this one would be to simply update the --help doc and remove the ""

hugoclrd avatar Feb 22 '23 19:02 hugoclrd