foundry-rs / starknet-foundry

Blazing fast toolkit for developing Starknet contracts.
https://foundry-rs.github.io/starknet-foundry/
MIT License
324 stars 176 forks source link

Omit compilation of lib target #2408

Open cptartur opened 2 months ago

cptartur commented 2 months ago

Right now we run Scarb compilation two times: First to build contracts used in tests and again to build test targets. We should implement some mechanism that allows the tests to be compiled alongside with tests artifacts.

  1. This needs to be coordinated with and implemented in Scarb first
  2. This feature should be configurable. Contracts behavior can change when building in test mode: We should still allow to do compilation in two separate steps to allow to test more closely to real network behavior.

First, we should create a design doc for this.

RealJohnnyTime commented 2 months ago

IMO This issue it quite urgent since it really ruins the development experience that you have to wait 5 minutes every small change that you make in the code to see if the tests pass :(

Arcticae commented 2 months ago

@RealJohnnyTime we are working on a solution

ddoktorski commented 1 month ago

The one thing left to do is to omit compiling lib target when --no-optimization flag is enabled. This should be done by leveraging --target-kinds flag in the scarb build command (added in Scarb 2.8.3).