Releases: FuelLabs/sway
Releases · FuelLabs/sway
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
v0.37.0
What's Changed
- Use a
DeclRef
for the "EnumVariant" variant. by @emilyaherbert in #4398 - Bump to
fuel-core v0.17.8
by @mohammadfawaz in #4396 - Update
runs-on
for thepublish
step to get more disk space by @mohammadfawaz in #4400 - feat: parallel unit test runners by @kayagokalp in #4395
- Bump to
v0.37.0
by @mohammadfawaz in #4401
Full Changelog: v0.36.1...v0.37.0
v0.36.1
What's Changed
- Adds urls to graph.visualize generated dot file. by @esdrubal in #4310
- Implement associated consts for traits by @tritao in #4301
- Bump to
v0.36.1
by @mohammadfawaz in #4397
Full Changelog: v0.36.0...v0.36.1
v0.36.0
What's Changed
- Limited autocomplete for expressions by @sdankel in #4207
- Improve
forc doc
navigation interface by @eureka-cpu in #4212 - Add lock file for sdk-harness test workspace, pin fuel-core to 0.17.3, fix sdk-harness CI issues by @mitchmindtree in #4248
- Adjust std::alloc::alloc() to accommodate upcoming VM changes. by @otrho in #4245
- Standardized module structure by @IGI-111 in #4232
- Change some
TyDeclaration
variants to hold decl refs by @JoshuaBatty in #4247 - Revert "Change some
TyDeclaration
variants to hold decl refs" by @emilyaherbert in #4252 - Add the
TypeInfo::TypeParam
variant but don't use it yet. by @emilyaherbert in #4253 - Apply new clippy suggestions from new clippy update by @emilyaherbert in #4259
- Remove a couple unneeded uses of
CompileResult
. by @emilyaherbert in #4254 - Updated tests to not use spent messages by @xgreenx in #4257
- Bump to fuels
v0.37
and add a test and docs forconfigurable
blocks by @mohammadfawaz in #4255 - Introduce
CallPath
toTyConstantDeclaration
by @mohammadfawaz in #4219 - feat(fmt): fmt comments with local insertions by @bingcicle in #4192
- refactor(forc-pkg): Attempt to simplify build/compile fns by introducing dedicated types by @mitchmindtree in #4209
- doc: Adding annotations support on highlight.js by @cold-briu in #4186
- More intrinsics and
const_eval
by @vaivaswatha in #4260 - Use
DeclId
directly forTyDeclaration::StructDeclaration
andTyDeclaration::EnumDeclaration
. by @emilyaherbert in #4251 - Make AST serializable by @AlicanC in #4193
- Add tokens for storage reassignment by @IGI-111 in #4261
- Slightly improve the
DeclRef
API and interface. by @emilyaherbert in #4258 - Share utils between sway-parse unit tests by @AlicanC in #4265
- Introduce
TypeSubstList
and add it toTyDeclaration
andDeclRef
. by @emilyaherbert in #4256 - Storage Vector Method and Dev-Doc Enhancements by @jtriley-eth in #4172
- Improve attribute parsing by @AlicanC in #4134
- Improve debug printing for
DeclId
. by @tritao in #4271 - refactor: remove span based test filters by @kayagokalp in #4280
- Error out on wrongly sized tuple destructuring by @IGI-111 in #4281
- Use
DeclRef
inTyExpressionVariant
variants. by @emilyaherbert in #4273 - fix(fmt): do not add extra spaces in empty parameter list when formatting by @bingcicle in #4269
- Update API for transforming declarations to
DeclRef
's. by @emilyaherbert in #4288 - docs: quick-start section move the
--node-url
explanation under the example by @kayagokalp in #4279 - Implement parsing and semantic analysis for associated consts by @tritao in #4262
- Make string representations of build targets consistent by @AlicanC in #4296
- Fixes trait item method DCA warning. by @esdrubal in #4229
- Implementing basic type aliases by @mohammadfawaz in #4151
- Manually clone
self
insubtract
forU256
andpow
forU128
by @mohammadfawaz in #4294 - ci: strip release binaries by @fgimenez in #4268
- feat: multi contract calls in unit tests for contracts by @kayagokalp in #4156
- refactor: deprecate
ConfigTimeConstant
s by @bingcicle in #4298 - Add skeleton code for monomorphization solver. by @emilyaherbert in #4264
- Implements unused variable DCA warning. by @esdrubal in #4286
- Upgrade to actions/checkout@v3 in CI to fix Node.js deprecation warnings by @tritao in #4305
- direct to fuel book quickstart by @sarahschwartz in #4313
- Cleanup TOMLs by @AlicanC in #4312
- Introduce the StorableSlice trait to the std library by @bitzoic in #4302
- Return
DeclRef
fromTypeBinding::type_check
. by @emilyaherbert in #4308 - docs: remove missing feature regarding configurables by @bingcicle in #4317
- docs(fmt): update swayfmt docs by @bingcicle in #4322
- Update
DeclEngine
API to use more abstract methods. by @emilyaherbert in #4315 - Rename
TypeSubstList
toSubstList
. by @emilyaherbert in #4323 - forc-pkg: throw error for nested workspaces by @bingcicle in #4321
- Fix semantic definitions for
Self
andself
tokens by @JoshuaBatty in #4325 - Improve layout of the
type_system
sub-module. by @emilyaherbert in #4316 - Double "Number of" removed from
StorageVec
inline documentation by @bitzoic in #4330 - Refactor
TyScrutinee
to useDeclRef
. by @emilyaherbert in #4327 - Remove the obsolete
unify_adt
method. by @emilyaherbert in #4332 - Rename
Declaration
toDecl
in a number of places. by @emilyaherbert in #4324 - Storage Vector New Methods by @jtriley-eth in #4174
- StorageVec Precondition Tests by @jtriley-eth in #4335
- Fixes DCA warning in impl block instead of method. by @esdrubal in #4326
- fix(fmt): item trait comment/annotation formatting by @bingcicle in #4364
- refactor: item_configurable test to use test_macros by @bingcicle in #4365
- feat: Introduce git SSH support to forc by @kayagokalp in #4287
- Add support for nested submodules to
forc doc
by @eureka-cpu in #4333 - streamline installation steps by @camiinthisthang in #4380
- IR explicit pointer refactor. by @otrho in #4336
- chore(
forc-doc
): Reorganizes the file tree by @eureka-cpu in #4382 - Allow importing enum variants by @IGI-111 in #4381
- docs: fix the
return_data
action value example by @iqdecay in #4367 - Conditional compilation by @AlicanC in #4292
- Improve ContractCaller type labels in CompileErrors and LSP features by @sdankel in #4361
- feat: allow multiple salt declarations in
forc deploy
by @bingcicle in #4362 - Rename
FunctionalDeclId
toAssociatedItemDeclId
. by @tritao in #4386 - feat: add
forc contract-id
andforc predicate-id
commands by @kayagokalp in #4338 - LSP: Refactor to use
Engines
where possible by @JoshuaBatty in #4392 - Bump to fuels
v0.39.0
by @mohammadfawaz in #4391 - Bug: ArithmeticOverflow when multiplying two large U256 numbers by @rostyslavtyshko in #4390
- Disallow block-level const declarations without a value expression. by @tritao in #4385
- Bump to
v0.36.0
by @mohammadfawaz in #4388
Breaking Changes
- Defining and structuring modules in Sway project has been reword. The
dep
keyword has been removed from the language in favour ofmod
:mod
declarations include a single ident specifying the name of the submodule. Note that this is different fromdep
declarations which would supply a/
-separated file system path to the submodule. Since the name of the submodule is specified in the declaration, submodules no longer need to supply their name via alibrary name;
header at the start of the file and can instead use the plainlibrary;
. The name of a submodule is used to find the source file for that submodule. For a submodule namedbar
of a modulefoo
, either the filefoo/bar.sw
orbar.sw
must exist. These paths are relative to the file defining thefoo
module containing themod bar;
declaration. It is an error for both or none of these paths to exist. Module paths behave the same as they previously did except that they use...
v0.35.5
What's Changed
- Fix decl engine accepting wrongly typed indices by @IGI-111 in #4234
- Improves
forc build --dca-graph
. by @esdrubal in #4239 - fix(forc-pkg): Unify member source types, fix manifest entries, fix #4235 by @mitchmindtree in #4237
- Fixes DCA unused struct warning. by @esdrubal in #4238
- Adds visibility check for fully qualified function by @esdrubal in #4241
- Bump to
v0.35.5
by @mohammadfawaz in #4242
Full Changelog: v0.35.4...v0.35.5
v0.35.4
What's Changed
- Represent module level doc comments in
forc doc
by @eureka-cpu in #4096 - rm unused compiler errors by @jtriley-eth in #4143
- Add tokens for where clause by @IGI-111 in #4149
- Rework trait/ABI/impl and constant related code. by @tritao in #4140
- ci: fix forc-fmt usage in CI when checking examples by @bingcicle in #4153
- Add usage docs for Salt feature by @mehtavishwa30 in #4132
- Fix: add type_def for
GenericTypeForFunctionScope
and fix storage field type_def by @JoshuaBatty in #4167 - Add LSP tests for
TyAbiDeclaration
by @JoshuaBatty in #4165 - add Result to blockchain types by @camiinthisthang in #3894
- refactor(
forc-pkg
): Abstract outsource
-related items frompkg
by @mitchmindtree in #4168 - DCA now detects dead code when all branches return explicitly. by @vaivaswatha in #4169
- Add syntax highlighting to code blocks in
forc doc
by @eureka-cpu in #4176 - Add
forc build
flag to treat warnings as errors by @vaivaswatha in #4177 - Storage Vector Test Refactor by @jtriley-eth in #4171
- Remove unnecessary call to export methods defined for trait fn return types. by @emilyaherbert in #4182
- feat(forc-pkg): Print before compiling each package. Only print after on warnings/error. by @mitchmindtree in #4187
- feat(forc-pkg): Improve workspace build summary by @mitchmindtree in #4188
- Small refactor to only create a
TraitMap
entry for the supertraits if there are supertraits. by @emilyaherbert in #4183 - Clear memory from type and decl engines by @JoshuaBatty in #4190
- Set up infrastructure for MidenVM compilation mode by @p0ry-g0n in #4173
- Rework trait mapping code to be item-based. by @tritao in #4179
- feat(fmt): format comments supertraits by @bingcicle in #4129
- feat: display gas used for unit tests by @kayagokalp in #4178
- Simplify stored types during token collection by @JoshuaBatty in #4202
- Add
std
docs to the sway book by @eureka-cpu in #4204 - fix: calculate contract dependency ids with tests disabled by @kayagokalp in #4159
- Generic refactor of
DeclEngine
by @IGI-111 in #4181 - Check for regressions in warnings thrown by @vaivaswatha in #4210
- Adds documentation for Sway attributes. by @esdrubal in #4203
- Implements #[allow(dead_code)] by @esdrubal in #4170
- Implements json abi with call paths for structs and enums. by @esdrubal in #4137
- Use
DeclRef
for struct and enum TypeInfo by @IGI-111 in #4213 - Fix broken link and missing summary item for the "Attributes" chapter by @mohammadfawaz in #4214
- Update the invalid link to Developer Quickstart Guide in the Sway Docs. by @h3lio5 in #4216
- Add links for types that go to their definitions by @eureka-cpu in #4017
- Refactor to use
Engines
where possible by @emilyaherbert in #4225 - Remove re-borrow of
Engines
, which is aCopy
type. by @emilyaherbert in #4224 - New example for methods and associated functions by @mohammadfawaz in #4226
- fix(forc-fmt): propagate error on failure by @bingcicle in #4222
- ci: check for
fuels
deps inforc-pkg
by @bingcicle in #4221 - LSP: Rewrite
LexedProgram
andParseProgram
traversal to use the Parse trait. by @JoshuaBatty in #4220 - Add more logging to flaky test by @sdankel in #4227
- Disable flaky goto definition testcase until fixed by @sdankel in #4228
- bump to
v0.35.4
by @mohammadfawaz in #4230
New Contributors
Full Changelog: v0.35.3...v0.35.4
v0.35.3
What's Changed
- docs: updated docs with missing supported workspace commands by @kayagokalp in #4122
- refactor(fmt): dedup
fmt_test!
macros by @bingcicle in #4100 - Collect
Expression
from asm register decls by @JoshuaBatty in #4128 - Collect tokens for intrinsics' turbofish by @IGI-111 in #4094
- feat(fmt): comments in item abi by @bingcicle in #4005
- Fixes struct and enum call path comparison to use suffix. by @esdrubal in #4133
- Add Google Analytics ID to book.toml by @mehtavishwa30 in #4121
- Provide
opt
options for verify and print after each pass by @vaivaswatha in #4131 - create workspace for examples folder by @mehtavishwa30 in #4118
- beta-3 update by @mehtavishwa30 in #4079
- refactor: Move the examples workspace manifest into examples directory. Use it in CI. by @mitchmindtree in #4145
- Update Sway book section on
forc-wallet
for changes in v0.2.0 by @mitchmindtree in #4146 - fix(fmt): forc-fmt check by @bingcicle in #4147
- Update
match
examples by @camiinthisthang in #4107 - Bump to
v0.35.3
by @mohammadfawaz in #4135
Full Changelog: v0.35.2...v0.35.3
v0.35.2
What's Changed
- bug(fmt): do not iteratively call forc-fmt over members on the root dir by @bingcicle in #4038
- Support inner module doc attributes with
#!
&//!
syntax by @eureka-cpu in #4081 - Add tokens for
impl
targets by @IGI-111 in #4101 - Add and create
PassGroup
s by @vaivaswatha in #4099 - Supertraits for ABIs by @anton-trunov in #3992
- Add
mut
keyword toappend()
in theBytes
type by @bitzoic in #4110 - fix(fmt): match branch enum extra newline by @bingcicle in #4084
- fix: empty fn comments by @bingcicle in #4093
forc-tx
: Improve error handling usingthiserror
. Fixpanic!
ing version/help output. by @mitchmindtree in #4085- Limit inner doc comment attributes to
Module
by @eureka-cpu in #4113 - Support for configurable blocks in the formatter by @mohammadfawaz in #4105
- Check for storage types in impl method params by @vaivaswatha in #4119
- feat: Upon test failure, output revert code with human-readable label and associated logs by @kayagokalp in #3999
- add missing go to def tests for structs by @JoshuaBatty in #4115
- feat: Add salt flag to
forc deploy
, maturity flag todeploy
andrun
by @mitchmindtree in #4116 - Bump to
v0.35.2
by @mohammadfawaz in #4123
Full Changelog: v0.35.1...v0.35.2
v0.35.1
What's Changed
- Introduce a
StorageBytes
type in the standard library by @bitzoic in #4001 - Add a new
name
field onDeclId
and remove some unnecessary lookups in theDeclEngine
by @emilyaherbert in #4028 - Remove branch based fuel-core dep for sdk-harness by @Voxelot in #4033
- Add
HashWithEngines
impls for more types by @emilyaherbert in #4014 - LSP tests for
TyFunctionDeclaration
by @JoshuaBatty in #4031 - Add a
forc-submit
plugin command for submitting txs to a given node by @mitchmindtree in #3885 - feat: only build relevant members for
forc-client
operations by @kayagokalp in #4008 - Add tokens for match scrutinees by @IGI-111 in #4035
- Adds support for
Enum::<T>::Variant
. by @esdrubal in #3795 - Fix reference formatting in forc doc by @eureka-cpu in #4041
- Update links in libraries.md by @Saviour1001 in #4044
- Add tokens for function parameters, return types and type ascriptions by @IGI-111 in #4042
- Update installation.md for beta-3 by @mehtavishwa30 in #4039
- Changes TypeInfo::Custom to have call paths. by @esdrubal in #4026
- Change hyphens to underscores for library names when running
forc new/init
by @mohammadfawaz in #4048 - Fix suffix token handling for enum and struct by @IGI-111 in #4061
- Add tokens for generic custom type fields by @IGI-111 in #4066
- LSP tests for
TyEnumDeclaration
andTyStructDeclaration
by @JoshuaBatty in #4057 - beta-3 updates by @mehtavishwa30 in #4068
- fix: add span based filter for
forc-test
test counts by @kayagokalp in #4069 - Introduce
DeclRef
and remove excessive clones toDeclId
by @emilyaherbert in #4037 - Add code actions for struct and refactor by @sdankel in #4032
- Pass dependencies and resolution in the pass manager by @vaivaswatha in #4067
- Collect full call paths in generic types by @IGI-111 in #4075
- Collect tokens for
ContractCaller
andabi
casts by @IGI-111 in #4083 - Update expected revert string in
storage_vec
tests to fix CI failure by @mohammadfawaz in #4090 - Small refactor to the method call to type check a list of
TypeParameter
by @emilyaherbert in #4089 Not
trait implementation forU128
andU256
by @rostyslavtyshko in #4077- Additional rustdoc documentation for
DeclRef
by @emilyaherbert in #4087 - Implement
OrdWithEngines
for some types by @emilyaherbert in #4082 - Bump to
v0.35.1
by @mohammadfawaz in #4088
New Contributors
- @Saviour1001 made their first contribution in #4044
Full Changelog: v0.35.0...v0.35.1