Releases: software-mansion/scarb
v2.9.2
Welcome to the release notes for Scarb v2.9.2
!
This release is primarily a Cairo update.
New developments included
- Fix displaying labels of linked items in doc - Since this release, both
[label](path)
and[path]
format of cross item links can be used in Scarb doc. - Fix component dependencies resolution - Fix an edge case where some transient dev dependencies has been included in some component dependencies unnecessarily.
Cairo Version
This version of Scarb comes with Cairo v2.9.2
.
What's Changed
- Explicitly set rust-version for cairo-lang-macro crate by @maciektr in #1787
- fix: bump bytes to 1.9.0 by @chenrui333 in #1792
- Bump the non-critical group with 6 updates by @dependabot in #1798
- Bump deno_task_shell from 0.18.1 to 0.20.2 by @maciektr in #1800
- Bump slackapi/slack-github-action from 1.27.0 to 2.0.0 by @dependabot in #1794
- Fix label displaying in case 2 part linakge in scarb doc by @wawel37 in #1803
- Add linkage docs to scarb doc by @wawel37 in #1802
- Use new ls package by @wawel37 in #1804
- Disable caching for setup-scarb in Scarb CI by @maciektr in #1807
- Update README by @maciektr in #1816
- Bump the non-critical group with 7 updates by @dependabot in #1819
- Make unstable* flags warning more explicit by @maciektr in #1822
- Use patch-based Cairo dependencies specification by @mkaput in #1818
- Bump nanoid from 3.3.7 to 3.3.8 in /website by @dependabot in #1837
- Refactor: pull CU dependencies directly from dependency graph by @maciektr in #1820
New Contributors
- @chenrui333 made their first contribution in #1792
Full Changelog: v2.9.1...v2.9.2
v2.9.1
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.
- Allow ignoring Cairo version checks - Version requirements defined in
-
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 withscarb package
and published withscarb 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.
- Packaging procedural macros - Packages implementing procedural macros (with
-
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 withscarb doc
. - Corelib documentation on Scarb website - Cairo core library documentation is now automatically published on Scarb documentation website with every release.
- Reexported modules documentation support - Documentation generated with
Cairo Version
This version of Scarb comes with Cairo v2.9.1
.
What's Changed
- Test compilation diagnostics reporter by @maciektr in #1577
- Dependencies crate settings by @wawel37 in #1616
- Use compiler's paths directly / remove workaround code by @wawel37 in #1609
- Doc/support reexported modules by @wawel37 in #1620
- Cairo update by @maciektr in #1625
- Add signature for struct's member by @wawel37 in #1601
- Pass contract declarations to compile_test_prepared_db / Cairo update by @maciektr in #1636
- Do not allow importing by test target name in integration tests by @maciektr in #1634
- Update Cairo by @maciektr in #1641
- Bump the non-critical group with 4 updates by @dependabot in #1645
- Support packaging cairo-plugins by @DelevoXDG in #1605
- Add diagnostics and handle errors gracefully / Upgrade Cairo. by @wawel37 in #1590
- Hide docs for impls of hidden traits / traits with hidden generic args. by @maciektr in #1644
- Enable features for main package during integration tests compilation by @DelevoXDG in #1646
- Add add_redeposit_gas to compiler config by @maciektr in #1650
- Fix packaging plugins when
--no-verify
is passed by @DelevoXDG in #1643 - Doc fix - procedural macros by @wawel37 in #1651
- Doc typo fix - Publishing to registry by @DelevoXDG in #1654
- Bump the non-critical group with 7 updates by @dependabot in #1664
- Stop using process:exit for error code handling by @maciektr in #1652
- Add CI to publish builtin plugins by @DelevoXDG in #1648
- Return ExitCode instead of process:exit() in extensions by @maciektr in #1667
- Update mermaid dependency by @maciektr in #1671
- Support UI verbosity in scarb-doc by @maciektr in #1668
- Update Cairo by @maciektr in #1672
- Remove snforge-test-collector by @piotmag769 in #1675
- Remove code mappings for attribute expand (temp) by @maciektr in #1657
- Add
scarb-doc
-generated corelib docs to GitHub Pages by @DelevoXDG in #1658 - Add component dependencies to metadata by @piotmag769 in #1655
- Add test for building corelib docs by @maciektr in #1687
- Add warning on unset edition by @DelevoXDG in #1663
- Feat: Support --print-detailed-resources parameter in cairo-run by @maciejka in #1688
- Fix tests for cairo-run args validation by @maciektr in #1691
- Bump gix from 0.66.0 to 0.67.0 by @dependabot in #1693
- Bump the non-critical group with 9 updates by @dependabot in #1692
- Prepare
scarb-metadata
release1.13.0
by @maciektr in #1694 - Update Cairo by @maciektr in #1711
- Add advisory lock for registry cache db by @maciektr in #1712
- Bump the non-critical group with 6 updates by @dependabot in #1713
- Cairo update by @maciektr in #1714
- Add
--ignore-cairo-version
flag by @DelevoXDG in #1666 - Add derives to
cairo-lang-macro
by @Draggu in #1676 - Proc macro server API by @Draggu in #1715
- Add
proc-macro-server
command by @Draggu in #1679 - Proc macro server: Load
ProcMacroHost
by @Draggu in #1680 - Add Proc macro server by @Draggu in #1681
- Add
RpcResponse
result helper by @Draggu in #1719 - Add request handling by @Draggu in #1682
- Add test helpers by @Draggu in #1718
- Add
DefinedMacros
handler by @Draggu in #1683 - Add
ExpandAttribute
handler by @Draggu in #1684 - Add
ExpandDerive
handler by @Draggu in #1685 - Add
ExpandInline
handler by @Draggu in #1686 - Bump the non-critical group with 4 updates by @dependabot in #1723
- Add cairo-ls as code owners of proc-macro-server by @maciektr in #1730
- Update Cairo by @maciektr in #1739
- Prepare
cairo-lang-macro
release0.1.1
by @maciektr in #1740 - Prepare
scarb-proc-macro-server-types
release0.1.0
. by @maciektr in #1741 - Website: Suggest asdf as the default installation method by @maciektr in #1744
- Bump the non-critical group with 7 updates by @dependabot in #1752
- Mute UI when reading ws for external command by @maciektr in #1755
- Cairo update by @maciektr in https://github.com/software-mansion/scarb/pull/...
v2.8.5
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
andscarb 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
- Support packaging cairo-plugins by @DelevoXDG in #1605
- Enable features for main package during integration tests compilation by @DelevoXDG in #1646
- Fix packaging plugins when --no-verify is passed by @DelevoXDG in #1643
- Doc fix - procedural macros by @wawel37 in #1651
- Doc typo fix - Publishing to registry by @DelevoXDG in #1654
- Stop using process:exit for error code handling by @maciektr in #1652
- Add CI to publish builtin plugins by @DelevoXDG in #1648
- Return ExitCode instead of process:exit() in extensions by @maciektr in #1667
- Update mermaid dependency by @maciektr in #1671
Full Changelog: v2.8.4...v2.8.5
v2.8.4
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
- Ignore items with #[doc(hidden)] by @wawel37 in #1597
- Update snforge init test for foundry 0.31.0 by @maciektr in #1618
- Bump the non-critical group with 4 updates by @dependabot in #1621
- Fix documentation typo by @wawel37 in #1624
- feat: scarb fmt a subdirectory by @enitrat in #1626
- Update scarb docs by @maciektr in #1630
- Bump deno_task_shell from 0.18.0 to 0.18.1 by @dependabot in #1633
- Bump once_cell from 1.20.0 to 1.20.2 in the non-critical group by @dependabot in #1632
New Contributors
Full Changelog: v2.8.3...v2.8.4
v2.8.3
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
- Bump the non-critical group with 6 updates by @dependabot in #1583
- Update Cairo by @maciektr in #1584
- Update CODEOWNERS by @maciektr in #1588
- Print profile name in finished targets message by @maciektr in #1587
- Add target-kinds filter argument to build by @maciektr in #1589
- Feat: cairo-run extension: support --arguments-file optional parameter by @m-kus in #1591
- Bump the non-critical group with 3 updates by @dependabot in #1594
- Bump dompurify from 3.0.5 to 3.1.6 in /website by @dependabot in #1595
- Make paths displed on left nav bar if duplicated by @wawel37 in #1592
- Fix single package features in a workspace by @maciektr in #1593
- Bump vite from 5.2.12 to 5.4.6 in /website by @dependabot in #1602
- Support more ModuleItems in proc macro attribute expansion by @maciektr in #1556
- Adjust tests to new trait types and consts signatures by @wawel37 in #1600
- Remove redundant call to DiagnosticsReporter::ensure by @maciektr in #1604
- Compile contract artifacts in test targets by @maciektr in #1585
- Bump thiserror from 1.0.63 to 1.0.64 in the non-critical group by @dependabot in #1607
- Update docs by @maciektr in #1606
- Only search build-external-contracts for contracts in test target compilation by @maciektr in #1612
- Bump starknet-types-core from 0.1.5 to 0.1.6 by @dependabot in #1608
- Bump rollup from 4.21.3 to 4.22.4 in /website by @dependabot in #1614
New Contributors
Full Changelog: v2.8.2...v2.8.3
v2.8.2
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. Thehighlight.js
highlighter modified for use withscarb 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
- Update README.md by @mkaput in #1558
- Update cairo by @maciektr in #1559
- Bump slackapi/slack-github-action from 1.26.0 to 1.27.0 by @dependabot in #1567
- Bump deno_task_shell from 0.17.0 to 0.18.0 by @dependabot in #1569
- Bump the non-critical group with 4 updates by @dependabot in #1568
- Fix unnecessary downloads of cached registry packages by @DelevoXDG in #1571
- Update highlight.js / hidden line rust. by @wawel37 in #1566
- Rename
open_rw
->create_rw
by @DelevoXDG in #1573 - Update CODEOWNERS by @maciektr in #1575
- Add
cargo xtask set-cairo-version --path
by @mkaput in #1578 - Remove allow(dead_code) from scarb-doc by @maciektr in #1574
- Add package publish by @THenry14 in #1570
Full Changelog: v2.8.1...v2.8.2
v2.8.1
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 likeassert_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
- Fix proc macro diagnostics stable pointer by @maciektr in #1555
- Fix assert macros by @maciektr in #1563
Full Changelog: v2.8.0...v2.8.1
v2.8.0
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(fixed inassert_macros
package that contains macros likeassert_eq!
is now versioned with the same version as Scarb.2.8.1
)
Cairo Version
This version of Scarb comes with Cairo v2.8.0
.
What's Changed
- Add cairo highlight documentation by @wawel37 in #1521
- Update Cairo by @maciektr in #1522
- Document registries and packaging process by @szymmis in #962
- Bump the non-critical group with 6 updates by @dependabot in #1526
- Fix test runner flag in docs by @maciektr in #1529
- Doc/features support by @wawel37 in #1511
- Update Cairo, move scarb-doc to rust-analyzer-salsa by @maciektr in #1531
- Document Scarb.toml
publish
field by @DelevoXDG in #1533 - Update Cairo by @maciektr in #1539
- starknet_multiple_contracts example refurbishment by @stranger80 in #1543
- Fix dev-deps propagation for ws members by @maciektr in #1542
- Revert "Fix diagnostics reporter main crates setup (#1514)" by @maciektr in #1540
- Pin assert_macros version to Scarb version by @maciektr in #1537
- Doc / Add
--document-private-items
flag by @wawel37 in #1528 - Do not show warnings from dependencies by @maciektr in #1547
- Add
unstable-add-statements-code-locations-debug-info
flag by @maciektr in #1538 - Bump the non-critical group with 7 updates by @dependabot in #1545
- Update gix to 0.66 by @maciektr in #1549
- Stack size troubleshooting by @maciektr in #1548
- Fix dev deps propagation by @maciektr in #1552
- Prepare release
2.8.0
by @maciektr in #1551
New Contributors
- @stranger80 made their first contribution in #1543
Full Changelog: v2.7.1...v2.8.0
v2.7.1
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
- Create highlight.js file for mdBook cairo support by @wawel37 in #1499
- Update cairo, fix nightlies by @THenry14 in #1505
- Bump the non-critical group with 5 updates by @dependabot in #1504
- Update cairo, fix nightlies by @THenry14 in #1510
- Fix diagnostics reporter main crates setup by @maciektr in #1514
- Added Nit about doc markdown being mdBook compatiable. by @wawel37 in #1513
- Bump the non-critical group with 7 updates by @dependabot in #1515
- Add basic scarb doc documentation by @wawel37 in #1518
- Prepare release
2.7.1
by @maciektr in #1520
New Contributors
Full Changelog: v2.7.0...v2.7.1
v2.7.0
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
- Update Cairo by @maciektr in #1469
- Bump the non-critical group with 6 updates by @dependabot in #1470
- Foldable sidebar by @piotmag769 in #1468
- Bump openssl from 0.10.64 to 0.10.66 by @dependabot in #1471
- Fix clippy warnings after rust update by @maciektr in #1476
- Allow executing scripts in workspace root by @maciektr in #1473
- Bump gix-attributes from 0.22.2 to 0.22.3 by @dependabot in #1475
- Replace stabilized once_cell api by @maciektr in #1477
- Make scarb new and init command interactive by @ksew1 in #1472
- Fix inlining strategy flag - pass during db construction by @maciektr in #1478
- Bump gix from 0.63.0 to 0.64.0 by @dependabot in #1481
- Bump the non-critical group with 6 updates by @dependabot in #1480
- Update CODEOWNERS by @maciektr in #1482
- Prepare scarb-stable-hash for publishing by @maciektr in #1490
- Prepare cairo-lang-macro-stable for publishing by @maciektr in #1491
- Add procedural macros page to docs by @maciektr in #1492
- Fix verify archive smoke test by @maciektr in #1498
- Drop rlib from build_cairo_plugin tests by @maciektr in #1493
- Prepare cairo-lang-macro-attributes for publishing by @maciektr in #1494
- Prepare cairo-lang-macro for publishing by @maciektr in #1495
- Add link to docs.rs for cairo-lang-macro by @maciektr in #1496
- Prepare release 2.7.0 by @THenry14 in #1500
New Contributors
Full Changelog: v2.7.0-rc.4...v2.7.0