Releases: FuelLabs/sway
v0.42.0
What's Changed
- feat: report the name of failing dependencies that cannot be sourced by @kayagokalp in #4715
- Minimal String type by @IGI-111 in #4716
- Implement
StorageString
to std-lib by @bitzoic in #4725 - remove unused debug flag by @JoshuaBatty in #4726
- feat: add encoding capability to forc-client for variable encoding by @kayagokalp in #4680
- Fixes invalid IR, on impl self with where clause. by @esdrubal in #4732
- Fix inlay hints by @sdankel in #4735
- Doc storage read unwrap_or clarification. by @SilentCicero in #4736
- return diagnostics from parser errors by @JoshuaBatty in #4730
- Conversion from
str
literals toString
by @IGI-111 in #4741 - ci: bump rust version to 1.70 by @kayagokalp in #4749
- filter out
CompileError::UnknownVariable
errors whenCONTRACT_ID
isn't injected into namespace by @JoshuaBatty in #4727 - Fix: Constant initializer expressions cannot use bitwise not by @xunilrj in #4739
- refactor: move
sysinfo
behind a feature flag and only enable it for non-macos builds by @kayagokalp in #4750 - Fix block height type to conform to spec by @IGI-111 in #4753
- chore: bump to v0.42.0 by @kayagokalp in #4755
New Contributors
Full Changelog: v0.41.0...v0.42.0
v0.41.0
What's Changed
- fix: Change order of master deploy by @eureka-cpu in #4607
- Replace recursive build strategy with
BuildPlan
compilation order by @eureka-cpu in #4616 - Sway Reference: Section 9 Annotations. Document the payable annotation by @Braqzen in #4619
- Sway Reference: Section 9 Annotations: Testing by @Braqzen in #4622
- Simplify the lifetimes around engines by @IGI-111 in #4629
- Create devcontainer.json by @sdankel in #4377
- Fix a bug in the recent memory copy propagation by @vaivaswatha in #4628
- Fixes module path issue in core. by @esdrubal in #4633
- Sway Reference: Section 9 Annotations inline by @Braqzen in #4636
- Byte conversion for primitives by @SwayStar123 in #4630
- Sway Reference: Section 9 annotations: allow dead code by @Braqzen in #4624
- Sway Reference: Style Guide name convention by @Braqzen in #4638
- Span optimizations by @tritao in #4613
- Adding documentation for generic traits and trait constraints on free functions. by @emilyaherbert in #4620
- feat: prevent using dependency detail fields only relevant to git dependencies without specifying a git field in the manifest file by @kayagokalp in #4610
- Remove workaround with the HP pointer by @xgreenx in #4643
- Add code actions to generate doc comments by @sdankel in #4642
- Cleanup stdlib warnings by @tritao in #4648
- Test dot method calls disambiguation with
self
by @anton-trunov in #4649 - Fixes sha256 returning erroneous results. by @esdrubal in #4617
- make dir watcher use std::thread instead of async by @JoshuaBatty in #4658
- Bump tower-lsp and use the lsp_types crate directly by @JoshuaBatty in #4657
- Sway Ref: Style guide enum intro by @Braqzen in #4653
- LSP: generate doc comments for trait functions by @sdankel in #4665
- chore: bump sdk to 0.43, fuel-core to 0.18.2 by @kayagokalp in #4669
- Sway Ref: Style guide pattern matching by @Braqzen in #4655
- chore: make
fuel-tx
optional toforc-util
by @kayagokalp in #4668 - Refactor the
server.rs
module in the language server. by @JoshuaBatty in #4673 - feature(forc-pkg): Support IPFS-sourced dependencies by @mitchmindtree in #4299
- Additional identity methods by @SwayStar123 in #4683
- Wrong example in documentation fixed by @SwayStar123 in #4690
- fix: broken links, ignore DS_Store by @sarahschwartz in #4695
- Remove unused import from contract_id.sw by @SwayStar123 in #4691
- Sway Ref: Assertions assert_eq by @Braqzen in #4688
- chore: make
clippy
warnings errors inci_checks
script by @kayagokalp in #4682 - Add flag to reverse errors by @gr00vytvniks in #4142
- Add
GTF_OUTPUT_COIN_ASSET_ID
andGTF_OUTPUT_COIN_TO
opcode getters by @bitzoic in #4694 - Fixes trait map issue on the use of absolute path by @esdrubal in #4697
- Blanket trait implementations by @IGI-111 in #4687
- chore: fix default-feature warning for forc-client by @kayagokalp in #4681
- Unify AST compilation code between core and forc. by @tritao in #4670
- Handle integer overflow/underflow for non-64-bit integers by @anton-trunov in #4707
- Fix documentation typo by @digorithm in #4712
- Refactor
Bytes
type to useFrom
trait by @bitzoic in #4714 - chore: bump git2-rs version to 0.17.2 and required libgit2 to v1.6.4 by @kayagokalp in #4717
- Bump to v0.41.0 by @IGI-111 in #4720
- Fix style guide example not using local std by @IGI-111 in #4721
Full Changelog: v0.40.1...v0.41.0
v0.40.1
What's Changed
- Fix forc-run-benchmarks checkout steps for non-PR CI builds by @tritao in #4594
- Adds fully qualified paths for methods. by @esdrubal in #4579
- Fix
pub
token being removed by swayfmt by @IGI-111 in #4612 - Bump to v0.40.1 by @IGI-111 in #4614
- Remove duplicate type checker definitions in favor of
UnifyCheck
by @IGI-111 in #4593
Full Changelog: v0.40.0...v0.40.1
v0.40.0
What's Changed
- Enables where clauses for traits. by @esdrubal in #4584
- Stabilize module privacy by @IGI-111 in #4574
- Test reference examples under CI by @Braqzen in #4583
- fix:
std
publish directory by @eureka-cpu in #4590 - Benchmark / performance tracking by @tritao in #4564
- ci-fix: use latest (sourced via path) version of std while testing sway reference examples by @kayagokalp in #4597
- fix:
std
publish directory -- deploy step by @eureka-cpu in #4591 - fix:
std
publish dir deploy by @eureka-cpu in #4606 - Upgrade to
fuel-core 0.18.1
andfuels-rs 0.41
by @xgreenx in #4525 - Improve copy-propagation and DCE for memory operations by @vaivaswatha in #4592
- release: bump to v0.40.0 by @kayagokalp in #4601
Breaking Changes
- The new module privacy rules have now been stabilized and are the new default
New Optimizations
- Copy propagation improvements should result in significantly smaller binary sizes.
Our test suite binaries are now 7% smaller on average, of those affected by the optimization 23% smaller on average, with a maximum reduction of 88%.
Full Changelog: v0.39.1...v0.40.0
v0.39.1
What's Changed
- Add intrinsics tests by @IGI-111 in #4567
- feat: add a way to specify expected revert code to
forc-test
by @kayagokalp in #4554 - Remove aggressive predicate inlining by @IGI-111 in #4572
- ci: use
--locked
while installingcargo-generate
by @kayagokalp in #4578 forc doc
: Generate dependency documentation by @eureka-cpu in #4546- Refactor existing code to use engines and add a new query engine. by @tritao in #4575
- feat: implement
forc-test
filter by @kayagokalp in #4566 - Bump to v0.39.1 by @IGI-111 in #4585
Full Changelog: v0.39.0...v0.39.1
v0.39.0
What's Changed
- ci: extract out verify_tags step from publish job into its own job by @bingcicle in #4496
- Run
cargo update
by @sdankel in #4499 - Fixes
star_import_with_reexports
. by @esdrubal in #4498 - Add block_header_hash() function by @nfurfaro in #4493
- Adds support for where clauses in impl self methods. by @esdrubal in #3836
- Added to msg_sender to prelude and removed from swayfiles by @calldelegation in #4483
- Implement module privacy rules by @IGI-111 in #4474
- Add Option and Result variants in prelude by @IGI-111 in #4504
- Where clauses on
impl
blocks by @emilyaherbert in #3731 - Fix parser panic on empty file by @IGI-111 in #4507
- Remove leftover dbg!s by @AlicanC in #4509
- Fix underflow in
StorageVec
'sinsert
by @IGI-111 in #4508 - Fix
--finalized-asm
output and docs by @IGI-111 in #4510 - add constants page to summary by @sarahschwartz in #4514
- Allow more than 12b (up to 18b now) stack offsets for local initialization by @vaivaswatha in #4515
- Inlining heuristic: return value demotion adds arg by @vaivaswatha in #4518
- Allow loops in predicates by @IGI-111 in #4526
- Fix ordering bug in
U256
by @IGI-111 in #4527 - docs: add section comments for devrel by @sarahschwartz in #4531
- chore: remove leftover
build.sh
by @iqdecay in #4529 - chore: rename
fn_args_layout
tofn_params_layout
inrustfmt.toml
by @kayagokalp in #4530 - const-demotion locals must be loaded in same basic block as its use. by @vaivaswatha in #4534
- feat(
forc doc
): Addimpl_trait
representation toItemBody
by @eureka-cpu in #4389 - Fixes method application self mutability check. by @esdrubal in #4538
- Introduce unique
field_id
inStorageKey
by @IGI-111 in #4537 - Goto links for LSP hover by @sdankel in #4539
- Parse
__ptr[T]
and__slice[T]
by @AlicanC in #4522 - Fix
StorageVec
bugs with use offield_id
by @bitzoic in #4543 - Update
StorageBytes
to usefield_id
overslot
by @bitzoic in #4541 - feat(fmt): improve newline insertion when comments are in between leaf spans by @bingcicle in #4548
- Add links to hover documentation by @sdankel in #4532
- Implements where clauses for Structs and Enums. by @esdrubal in #4557
- Update
StorableSlice
function naming to match storage API by @bitzoic in #4562 - Use intrinsics for base integer operations by @IGI-111 in #4553
- Bump to 0.39.0 by @IGI-111 in #4568
Breaking changes
- Module privacy rules are changing to the ones described in RFC0008. The new behavior can be enabled with a flag. Code that doesn't respect the rules will still compile by default in this version. A warning will be emitted if the flag isn't enabled, and the new behavior should be made the default in the next version
- New reserved keywords:
__ptr
and__slice
StorableSlice
functions have been renamed to match the storage API- new intrinsics have been added in a way that breaks IR compatibility
Full Changelog: v0.38.0...v0.39.0
v0.38.0
Note: This is a re-publish of 0.37.2 under 0.38.0 due to some major breaking changes in the original.
What's Changed
- memcpyopt: Ensure source local isn't clobbered before the new memcpy by @vaivaswatha in #4422
- Fix ref mut parameter checking to apply to all function parameters. by @tritao in #4442
- U256 c fix by @rostyslavtyshko in #4441
- Failure to delete the only element of
Vec
of length 1 by @rostyslavtyshko in #4445 - chore: deprecate
built_pkgs_with_manifest()
by @bingcicle in #4447 - refactor:
forc-doc
- move headers above descriptions and add extra vertical spacing between items by @sarahschwartz in #4433 - refactor: Introduce
ForcResult
andForcError
to propagate return code with error message by @kayagokalp in #4455 - Refactor
TyDecl
Enum and Separate Structs for Improved Code Organization by @JoshuaBatty in #4457 - Remove unused locals by @vaivaswatha in #4458
- Implement OR match pattern by @IGI-111 in #4348
- refactor: better error formatting for
ForcResult
by @kayagokalp in #4460 - LSP: Rewrite
TyProgram
traversal to use theParse
trait. by @JoshuaBatty in #4467 - Sort forc-doc links alphabetically, add std-lib docs definitions by @sarahschwartz in #4465
- Fix hover docs for self and boolean keywords by @sdankel in #4469
- Switch the Sway
sdk-harness
tests to useForc
workspaces instead of the bash scriptbuild.sh
by @mohammadfawaz in #4476 - Bugfix: use the index param in std::tx::tx_witness_pointer by @nfurfaro in #4454
- Adding subsection on address and contract types by @calldelegation in #4479
- fix: forc-doc links sort order by @sarahschwartz in #4475
- fix(fmt): redundant newline insertions in commented code by @bingcicle in #4472
- Implements aliases support in DCA. by @esdrubal in #4337
- Fixes
Self
not found in match statement. by @esdrubal in #4459 - Improves error message when log is used in predicate. by @esdrubal in #4484
- ci: bump ci to use rust 1.69.0 by @kayagokalp in #4486
- Bump to v0.37.2 by @kayagokalp in #4492
- fix broken installation url, typo by @sarahschwartz in #4488
Breaking Changes (Language)
This release includes some major changes w.r.t. storage access! In particular, take a look at the following:
- Replace old storage API with the new one explained in the
StorageKey
RFC by @mohammadfawaz in #4464.
New Features
- feat: enable contract calls from unit tests in scripts by @kayagokalp in #4456
- feat:
forc contract-id
print contract name before printing id for workspaces by @kayagokalp in #4440 - feat: exit with 101 from forc-test if there are failing tests by @kayagokalp in #4463
- feat: workspace level patch table added by @kayagokalp in #4086
- Add the LSP highlighting capability. by @JoshuaBatty in #4434
- Implement associated consts for ABIs by @tritao in #4425
New Contributors
- @calldelegation made their first contribution in #4479
Full Changelog: v0.37.1...v0.38.0
v0.37.3
Full Changelog: v0.37.1...v0.37.3
NOTE: This republishes v0.37.1 as v0.37.3 to avoid users encountering breaking changes accidentally introduced in 0.37.2.
In particular, this release is aimed at addressing the following comment:
Currently our release bot doesn't make it easy to yank existing releases. Here we just republish 0.37.1 as 0.37.3 to ensure users updating their sway repo deps don't consume the breaking changes accidentally included in 0.37.2. I'll republish those breaking changes in a follow-up 0.38 release.
v0.37.2
NOTE: This release was accidentally published as a patch release.
We have released v0.37.3 that reverts these changes, and v0.38.0 that re-includes them.
You likely want one of those versions instead.
What's Changed
- feat:
forc contract-id
print contract name before printing id for workspaces by @kayagokalp in #4440 - memcpyopt: Ensure source local isn't clobbered before the new memcpy by @vaivaswatha in #4422
- Fix ref mut parameter checking to apply to all function parameters. by @tritao in #4442
- U256 c fix by @rostyslavtyshko in #4441
- Failure to delete the only element of
Vec
of length 1 by @rostyslavtyshko in #4445 - chore: deprecate
built_pkgs_with_manifest()
by @bingcicle in #4447 - refactor:
forc-doc
- move headers above descriptions and add extra vertical spacing between items by @sarahschwartz in #4433 - Add the LSP highlighting capability. by @JoshuaBatty in #4434
- refactor: Introduce
ForcResult
andForcError
to propagate return code with error message by @kayagokalp in #4455 - Refactor
TyDecl
Enum and Separate Structs for Improved Code Organization by @JoshuaBatty in #4457 - Remove unused locals by @vaivaswatha in #4458
- Implement OR match pattern by @IGI-111 in #4348
- refactor: better error formatting for
ForcResult
by @kayagokalp in #4460 - feat: workspace level patch table added by @kayagokalp in #4086
- LSP: Rewrite
TyProgram
traversal to use theParse
trait. by @JoshuaBatty in #4467 - feat: enable contract calls from unit tests in scripts by @kayagokalp in #4456
- Sort forc-doc links alphabetically, add std-lib docs definitions by @sarahschwartz in #4465
- Fix hover docs for self and boolean keywords by @sdankel in #4469
- feat: exit with 101 from forc-test if there are failing tests by @kayagokalp in #4463
- Switch the Sway
sdk-harness
tests to useForc
workspaces instead of the bash scriptbuild.sh
by @mohammadfawaz in #4476 - Bugfix: use the index param in std::tx::tx_witness_pointer by @nfurfaro in #4454
- Adding subsection on address and contract types by @calldelegation in #4479
- Implement associated consts for ABIs by @tritao in #4425
- fix: forc-doc links sort order by @sarahschwartz in #4475
- fix(fmt): redundant newline insertions in commented code by @bingcicle in #4472
- Replace old storage API with the new one explained in the
StorageKey
RFC by @mohammadfawaz in #4464 - Implements aliases support in DCA. by @esdrubal in #4337
- Fixes
Self
not found in match statement. by @esdrubal in #4459 - Improves error message when log is used in predicate. by @esdrubal in #4484
- ci: bump ci to use rust 1.69.0 by @kayagokalp in #4486
- Bump to v0.37.2 by @kayagokalp in #4492
New Contributors
- @calldelegation made their first contribution in #4479
Full Changelog: v0.37.1...v0.37.2
v0.37.1
What's Changed
- Switch the
cargo-test-lib-std
CI job to usebuildjet-4vcpu-ubuntu-2204
(Speeding up CI ~2X) by @mohammadfawaz in #4403 - Add conditional compilation by
program_type
by @AlicanC in #4393 - Fixes unifier generated warning spans. by @esdrubal in #4421
- fix: enable package manifest file verification during
PackageManifestFile::new
by @kayagokalp in #4412 - Allows configurable consts to be used in storage. by @esdrubal in #4423
- fix: forc-test exits with non-zero status code if there are failing tests by @kayagokalp in #4417
- Optimize LSP
parse_project
by @sdankel in #4414 - Implements DCA warnings for function parameters. by @esdrubal in #4406
- feat: enable raw pointer return from scripts by @iqdecay in #4341
- Updated the sway.js file by adding mod and type in keyword by @Yasir761 in #4427
- Reduce data section usage by attempting to store smaller offsets when compiling
get_local_var
by @mohammadfawaz in #4430 - Allow any
Ident
when parsingasm
block instruction opcodes by @mohammadfawaz in #4431 - feat: disallow nested packages by @kayagokalp in #4407
- Experimental:
StorageKey
feature by @mohammadfawaz in #4297 - Add LSP renaming functionality by @JoshuaBatty in #4277
- Bump to
v0.37.1
by @mohammadfawaz in #4435
New Contributors
Full Changelog: v0.37.0...v0.37.1