scarb
scarb copied to clipboard
Introduce test targets, get rid of test compilation being fanout among Scarb & cairo-test
We have an incident ⚠ All of: Scarb, Protostar and cairo-test-runner are manually constructing the RootDatabase and compiling tests on their own. The reason for this was to quickly deliver working software. We should eventually fix that!
The plan is:
- Let Scarb define a built-in
[[test]]
target. - Decide between all 3 projects what kinds of artifacts should this target produce. It should definitely include built, loadable Sierra code & some metadata files at least defining test functions paths.
- Migrate Protostar & cairo-test-runner to expect tests to be compiled externally by Scarb and only execute these artifacts.
Q: Perhaps the cairo-runner could also make a use of this target? @4rgorok
Please do not forget to support /tests
dir in projects structure
https://github.com/starkware-libs/cairo/issues/3777
https://github.com/foundry-rs/starknet-foundry/issues/289
Closing, as Starknet Foundry is migrated to procedural macros now 🥳 https://github.com/foundry-rs/starknet-foundry/tree/master/crates/snforge-scarb-plugin