-
Notifications
You must be signed in to change notification settings - Fork 144
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: Clarinet Requirements to automatically add the Trait Dependencies #1651
Comments
Hey @BowTiedBlox |
Related to #1463 |
Hello @BowTiedBlox With just this requirement: [[project.requirements]]
contract_id = 'SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-staking-sbtc-bdc-v-1-2' I do get all of the contract sub-dependencies: > tree .cache
.cache
└── requirements
├── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.sip-010-trait-ft-standard-v-1-1.clar
├── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.sip-010-trait-ft-standard-v-1-1.json
├── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-pool-sbtc-bdc-v-1-1.clar
├── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-pool-sbtc-bdc-v-1-1.json
├── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-pool-trait-v-1-2.clar
├── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-pool-trait-v-1-2.json
├── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-staking-sbtc-bdc-v-1-2.clar
├── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-staking-sbtc-bdc-v-1-2.json
├── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-staking-trait-v-1-2.clar
└── SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-staking-trait-v-1-2.json it's possible that you had a version that didn't properly epoch 3.1 contract back then. |
Is your feature request related to a problem? Please describe.
When adding a smart contract that depends on a trait (e.g.,
impl-trait x
), the required traits should be automatically included alongside other contract dependencies.For example, in the smart contract SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR.xyk-staking-sbtc-bdc-v-1-2.clar, the following trait dependency is declared:
Currently, this trait is not added to the
.cache/requirements
folder and thesimnet-plan
automatically.Describe the solution you'd like
When running
clarinet requirements add <contract-name>
, any referenced traits should also be included in the.cache
andsimnet-plan
.Example:
Expected behavior: The associated traits should be added automatically.
Describe alternatives you've considered
Additional context
Clarinet version used:
2.12.0
Might be related to #710 as the contract mentioned there, SPJ81C2WPQHFB6XTG518JKPABWM639R2X0B331XE.slimy-copper-walrus, uses traits as well.
The text was updated successfully, but these errors were encountered: