starknet-foundry
starknet-foundry copied to clipboard
Add Scarb "features" support for snforge
Closes #2025
TODO:
- tutorial in docs for mock contracts (contracts only for tests) that will not be compiled for default build
Introduced changes
- as in the title. Scarb features are like Rust features https://doc.rust-lang.org/cargo/reference/features.html
Checklist
- [x] Linked relevant issue
- [x] Updated relevant documentation
- [x] Added relevant tests
- [x] Performed self-review of the code
- [x] Added changes to
CHANGELOG.md
This probably closes also https://github.com/software-mansion/scarb/issues/847 as it solves the purpose? @maciektr And the first part of the #471? @Arcticae @MaksymilianDemitraszek
Misleading title, better would be, add Scarb "features" support for snforge
This PR adding the ability to have mock contracts only built when running tests will be beneficial for OZ users since now we have migrated to starknet foundry and had to include our mock contracts as part of the content of the released modules.
cc @cptartur
From PR description:
TODO: tutorial in docs for mock contracts (contracts only for tests) that will not be compiled for default build
Please make sure it is done/issue is created 🙏
The flow may not be immediately obvious for less advanced users. Moreover, putting contracts in tests
folder or code under #[cfg(test)]
won't solve the issue, which may also be not obvious