Skip to content

v2.8.3

Compare
Choose a tag to compare
@github-actions github-actions released this 26 Sep 10:33
· 98 commits to main since this release

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.8.3!

The primary aim of this release is to bring changes that will make test targets compilation faster.
This release also includes several interface changes and developments.

Contracts from dependencies no longer compiled by default with cairo-test

Warning

If your cairo-test tests use contracts defined in dependencies, an action is required!

Until this Scarb release, cairo-test has been implicitly building all contracts from all dependencies of the tested package.
This strategy has been seen as convenient for it's users (as no action has been required from them to use those contracts in their tests). However, as Cairo codebases grew, it became unsustainably suboptimal. Since this release, only contracts defined in build-external-contracts property on [[target.starknet-contract]] section are built when compiling tests. See Scarb documentation for more details. This is the same strategy, that has been already used by Starknet Foundry Forge, as described in docs.

Print profile names in finished build message

From this release, the message printed on finished build now includes the name of the profile used.
For example:

    Finished `dev` profile target(s) in 4 seconds

Support Trait and Impl inner functions in Scarb procedural macro attributes

It is now possible, to use attribute procedural macros on functions defined in traits or impls.
For instance, following syntax is now supported to expand some_attribute attribute.

#[abi(embed_v0)]
impl SomeImpl of ISomeInterface<ContractState> {
   fn get(self: @ContractState) -> u128 {
      self.counter.read()
   }

   #[some_attribute]
   fn increase(ref self: ContractState)  {
      self.counter.write( self.counter.read() + 1 );
   }
}

Features validation in a workspace bug fix

Due to a bug in features validation logic, it has been observed that features defined in a single package of a workspace failed to resolved if not defined in other workspace packages. This logic has been fixed now.

Minor interface changes

  • Target kinds filter in scarb build - This version introduces new optional argument --target-kinds which accepts a coma separated list of target kind names. If present, only specified target kinds will be built.
  • Cairo run arguments file - This version introduces new optional argument --arguments-file, which can be used to provide program arguments through file on host os.

Cairo Version

This version of Scarb comes with Cairo v2.8.2.

What's Changed

New Contributors

Full Changelog: v2.8.2...v2.8.3