Skip to content

Releases: software-mansion/scarb

v2.9.1

30 Nov 00:05
aba4f60
Compare
Choose a tag to compare

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.9.1!
This release includes several new developments and fixes.

  • Interface changes

    • Allow ignoring Cairo version checks - Version requirements defined in cairo-version fields in package manifests can be ignored with new --ignore-cairo-version flag.
    • Add redeposit gas flag - Compiler config now includes add_redeposit_gas flag.
  • Compilation model changes

    • Component dependencies in Scarb metadata - Scarb metadata includes information about dependencies of each component in a compilation unit.
    • Integration tests features - Integration tests should be compiled with the same feature set, as the main package.
    • Disallow imports by target name in integration tests - Integration tests cannot rely on test target name to reference self in imports and should use use crate::(...) instead.
  • Warnings and diagnostics

    • Edition unset warnings - Warnings are emitted for all loaded packages with no edition set in package manifest.
    • Warnings from dependencies silenced when building tests - Warnings originating in package dependencies are silenced when building package tests.
  • Bug fixes

    • Fix registry client cache file - Simultaneous access to a registry client cache file could result in interrupted downloads due to a race condition, fixed with advisory lock.
  • Procedural macros changes

    • Packaging procedural macros - Packages implementing procedural macros (with [cairo-plugin] target) can now be packaged with scarb package and published with scarb publish.
    • Inline procedural macro arguments - Inline procedural macros defined with Scarb do not get function name as part of the arguments token stream - only the associated arguments list (with delimiters).
    • Fix check command for procedural macros - Scarb check now properly builds all procedural macros required by the package.
  • New Scarb doc features

    • Reexported modules documentation support - Documentation generated with scarb doc now includes docs of modules reexported from the package.
    • Cross item linkeage support - Generated project documentation now resolves item references with [some::cairo::path] syntax, as clickable links.
    • Struct members signature - Documentation of structs, generated with scarb doc now includes struct's members signatures.
    • Diagnostics when generating documentation - If generating documentation of a package fails due to invalid Cairo code, Scarb should exit gracefully while showing compiler diagnostics instead of panicking.
    • Hiding docs of impls of hidden traits - Impls of traits hidden with doc(hidden) attributes are skipped when generating documentation with scarb doc.
    • Corelib documentation on Scarb website - Cairo core library documentation is now automatically published on Scarb documentation website with every release.

Cairo Version

This version of Scarb comes with Cairo v2.9.1.

What's Changed

Read more

v2.8.5

19 Nov 07:39
Compare
Choose a tag to compare

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.8.5!

The primary aim of this release is to bring Cairo compiler fix release.

New developments included

  • Support packaging cairo-plugins - Scarb can now be called with scarb package and scarb publish on a package, that implements procedural macros.
  • Support enabling features when compiling integration tests - This release fixes a bug, because of which selected features have not been enabled on main package of integration tests.

Cairo Version

This version of Scarb comes with Cairo v2.8.5.

What's Changed

Full Changelog: v2.8.4...v2.8.5

v2.8.4

07 Oct 18:19
Compare
Choose a tag to compare

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.8.4!

The primary aim of this release is to bring Cairo compiler fix release.

New developments included

  • scarb fmt for formatting path - Scarb formatter can now accept paths to format. This can be useful when integrating with external tooling.
  • #[doc(hidden)] support in Scarb Doc - Since this release, you can hide docs for some parts of your codebase with #[doc(hidden)] attributes.

Cairo Version

This version of Scarb comes with Cairo v2.8.4.

What's Changed

New Contributors

Full Changelog: v2.8.3...v2.8.4

v2.8.3

26 Sep 10:33
Compare
Choose a tag to compare

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

v2.8.2

09 Sep 12:12
Compare
Choose a tag to compare

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.8.2!
This release includes several bug fixes and new developments.

  • Scarb publish support - Scarb now supports publishing packages to the registry! To upload a package to the official scarbs.xyz registry, you can now simply do scarb publish. The authentication token for the registry interactions can be obtained through the registry and provided by environmental variable. Please see the "Publishing" page in our documentation for more information.
  • Hidden line support in doc snippets - documentation generated with scarb doc now supports hidding code lines in Cairo code snippets. The highlight.js highlighter modified for use with scarb doc generated docs supports highligthing snippets with hidden lines.
  • Unnecessary registry downloads fix - Due to a bug in registry client implementation, some packages would end up being unnecessarly downloaded multiple times. Since this release, this should not happen no more.

Cairo Version

This version of Scarb comes with Cairo v2.8.2.

What's Changed

Full Changelog: v2.8.1...v2.8.2

v2.8.1

30 Aug 10:21
Compare
Choose a tag to compare

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.8.1!
This is a quick fix release which does not include any new features - only bug fixes.

  • The assert_macros package version change - the assert_macros package that contains macros like assert_eq! is now versioned with the same version as Cairo compiler used by Scarb.

Cairo Version

This version of Scarb comes with Cairo v2.8.0.

What's Changed

Full Changelog: v2.8.0...v2.8.1

v2.8.0

28 Aug 09:18
09590f5
Compare
Choose a tag to compare

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.8.0!
This release includes several bug fixes and new developments.

  • Scarb features support in scarb-doc - you can now control conditional compilation while generating docs!
  • Document only public items - the documentation is now only generated for public items by scarb-doc (unless used with --document-private-items flag).
  • Cairo coverage support - Scarb now includes an unstable-add-statements-code-locations-debug-info Cairo config key that enables generating mappings used by cairo-coverage.
  • Dev dependencies propagation fix - due to an error in Scarb dependency resolver, in some cases dev-deps from other workspace members would end up being used during compilation.
  • Diagnostics fix - in some cases, diagnostics from package dependencies could be missing, resulting in a panic during package build.
  • The assert_macros package version change - the assert_macros package that contains macros like assert_eq! is now versioned with the same version as Scarb. (fixed in 2.8.1)

Cairo Version

This version of Scarb comes with Cairo v2.8.0.

What's Changed

New Contributors

Full Changelog: v2.7.1...v2.8.0

v2.7.1

14 Aug 09:00
e288874
Compare
Choose a tag to compare

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.7.1!

This release is primarily a Cairo update.

It also introduces an mdBook compatible Cairo code highlighter, that can be useful for docs generated with scarb-doc.

Cairo Version

This version of Scarb comes with Cairo v2.7.1.

What's Changed

New Contributors

Full Changelog: v2.7.0...v2.7.1

v2.7.0

01 Aug 14:08
e9a2b87
Compare
Choose a tag to compare

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.7.0!

This release comes with several new developments.

Procedural macros

Since this release, we now officially support code generation! You can write your own macros in Rust, that modify the Cairo code of your project during compilation.

Learn more by reading our docs.

Generating documentation with scarb-doc

With this release, it is now possible to automatically generate documentation for your project by running scarb doc command. This documentation will include all doc comments you add to your code with /// prefix. The collected documentation is output to the target/doc/<package-name> directory, in either custom JSON, or mdBook compatible markdown format.

Learn more by reading our docs.

Cairo Version

This version of Scarb comes with Cairo v2.7.0.

What's Changed

New Contributors

Full Changelog: v2.7.0-rc.4...v2.7.0

v2.7.0-rc.4

19 Jul 20:11
88bf935
Compare
Choose a tag to compare
v2.7.0-rc.4 Pre-release
Pre-release

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.7.0-rc.4!

Warning

This version is not supported on Starknet! If you want to develop contracts deployable to the current Starknet, please stick with Scarb v2.6.5

This quick release changes the default registry url used by Scarb.

Cairo Version

This version of Scarb comes with Cairo v2.7.0-rc.3.

What's Changed

New Contributors

Full Changelog: v2.7.0-rc.3...v2.7.0-rc.4