Releases: FuelLabs/sway
Releases · FuelLabs/sway
v0.48.1
v0.48.0
What's Changed
- Fixes blanket trait conflicts with impl trait for struct. by @esdrubal in #5247
- Introduce the
DEFAULT_SUB_ID
constant by @bitzoic in #5246 - Represent small values as single bytes by @IGI-111 in #4929
- Add AST module caching support for LSP by @JoshuaBatty in #5251
- Removes unnecessary insert_trait_implementation_for_type. by @esdrubal in #5267
- Remove unused monomorphization code. by @tritao in #5266
- remove local
fixtures-std
andfixtures-core
dirs and usestd v0.47.0
for lsp tests by @JoshuaBatty in #5274 - Fix array conversion doc by @SwayStar123 in #5268
- Search bar for forc-doc by @sdankel in #5269
- Improve inline arguments formatting by @cr-fuel in #5283
- Use type context when type_check enum instantiation by @xunilrj in #5285
- Fixes to update fuels-rs on small values as single bytes by @xunilrj in #5264
- fix fuel data section alignment by @xunilrj in #5290
- Remove Forc.lock files in LSP tests by @JoshuaBatty in #5294
- Fix typos in core and std libraries by @ironcev in #5295
- Provide useful error for "Cannot find trait Hash in this scope" by @ironcev in #5293
- Fixes error while using generic trait with multiple impls. by @esdrubal in #5265
- Add
clear()
toStorageKey
api by @bitzoic in #5284 - Refactor access to memory layout information by @ironcev in #5255
- Create README.md for sway-lsp by @sdankel in #5303
- Allow user to override initial storage slots in forc-deploy by @sdankel in #5311
- Rename input_owner to input_coin_owner by @richardgreg in #5301
- Introduce recursive analysis via cycle finding in dependency graph. by @tritao in #5210
- Changes
ConcurrentSlab
to no longer clone values by @esdrubal in #5313 - Implements the
Eq
trait forOption
by @brandonsurh in #5302 - Add u256 Hash trait impl by @SwayStar123 in #5366
- Improve comments in-between doc-comments and functions/methods by @crodas in #5364
- feat!: add transaction policies support by @hal3e in #5281
- [asm] peep-hole optimization for optimising aggregate index operation by @vaivaswatha in #5270
- Bump to v0.48.0 by @JoshuaBatty in #5275
New Contributors
- @richardgreg made their first contribution in #5301
- @crodas made their first contribution in #5364
- @hal3e made their first contribution in #5281
Full Changelog: v0.47.0...v0.48.0
v0.47.0
What's Changed
- Implement TODO in Storage API by @bitzoic in #5150
- Code quality updates for
Option
usage throughout the std lib by @bitzoic in #5154 - chore/docs: improve wording and fix typos by @PaulRBerg in #5157
- Fix parser panics in edge cases by @IGI-111 in #5155
- deprecated attribute by @xunilrj in #5142
- Replace TypeInfo::SelfType with a generic type parameter by @anton-trunov in #4962
- Function deduplication by @vaivaswatha in #5167
- Added keccak256 tests for Hasher by @brandonsurh in #5172
- Fixes associated types and re-enables tests. by @esdrubal in #5169
- Refactor use of destructive methods in
swayfmt
by @eureka-cpu in #5148 - Fix fmt whitespaces between comments and doc comments by @cr-fuel in #5178
- bug: Fix formatting for
ItemTraitItem
andAnnotated<T>
by @eureka-cpu in #5182 - feat: Bumping template to use fuels v0.48.0 by @calldelegation in #5181
- Fix new lines into empty implementation by @cr-fuel in #5176
- Remove
List
options from the formatter by @eureka-cpu in #5183 - docs: link to docs hub fuel installation guide by @cold-briu in #5144
- Fix formatting issue when generated by @calldelegation in #5185
- Fix formatting of
abi
&trait
function signatures by @eureka-cpu in #5186 - Implements qualified paths for associated types. by @esdrubal in #5160
- Add bytes conversions and move array conversions to std lib by @SwayStar123 in #5180
- Compiler assembly support for ecr1 and ed19 by @vaivaswatha in #5133
- fix u256 as ref type for configurables by @xunilrj in #5194
- Use
u32
as exponent inPower
instead ofSelf
by @IGI-111 in #5199 - docs: fix typos by @xiaolou86 in #5198
- Implements generic trait constraints. by @esdrubal in #5200
- Type check analysis by @tritao in #5134
- Use a copy of standard libraries for LSP tests by @IGI-111 in #5203
- Fixes unexpected error while using generic Into trait. by @esdrubal in #5211
- feat: auto-import for sway by @sdankel in #5174
- Support for more than 6 arguments in functions, without having to inline by @vaivaswatha in #5197
- Allow method calls between impl self methods. by @tritao in #4933
- pow impl for u256 by @xunilrj in #5195
- IR entities must reference their parent by @vaivaswatha in #5217
- Fix side effects in
if-let
expressions by @ironcev in #5215 - Add go-to definition for dependency types:
ImplTraits
by @eureka-cpu in #5205 - refactor: Move dir helpers from
forc-util
tosway-utils
by @JoshuaBatty in #5224 - Fixes error while using generic From and Into traits. by @esdrubal in #5218
- Optimize gas for
AssetId::new()
andAssetId::default()
functions by @bitzoic in #5226 - Refactor match expressions and fix critical issue by @ironcev in #5213
- Attempt to break long expressions into multiple lines by @cr-fuel in #5207
- #4318
forc-crypto
plugin exposing a CLI for common-use cryptographic operations by @cr-fuel in #5153 - Initialise large enough, same-const-initialised, arrays using loops by @vaivaswatha in #5240
- Fixes unexpected trait dummy method error. by @esdrubal in #5234
- Add code action to Qualify as Path by @sdankel in #5222
- Add revert cases for new ecr functionality by @bitzoic in #5233
- Error for uninitialized register on asm blocks by @xunilrj in #5231
- Introduce explicit type check unification pass by @tritao in #5158
- bug: Update
swayfmt::Config
& remove partial implementations by @eureka-cpu in #5193 - Add custom LSP method for visualizing build plan by @sdankel in #5243
- Fix hash.sw, replaced
#![foo]
for#[foo]
by @cr-fuel in #5248 - Do not memcpy optimize when passed as fn arg by @vaivaswatha in #5253
- allow implicit stdlib to be configured with env vars by @xunilrj in #5249
- Fixes missing error on type unification. by @esdrubal in #5230
- correctly deal with missing semicolons by @xunilrj in #5236
- Fix DCA handling for
__revert
intrinsic andstd::revert
. by @tritao in #5235 - Optimizes
type_engine.insert
to be done inside if. by @esdrubal in #5254 - Update CI to handle forc-crypto by @IGI-111 in #5256
- Bump to v0.47.0 by @IGI-111 in #5257
New Contributors
- @xiaolou86 made their first contribution in #5198
Full Changelog: v0.46.1...v0.47.0
v0.46.1
What's Changed
- Synchronize code_lens request & provide better UX for
forc-fmt
<>sway-lsp
interaction. by @JoshuaBatty in #5094 - Implements associated types by @esdrubal in #5048
- Scalar Replacement of Aggregates by @vaivaswatha in #5114
- Update deployment dockerfile to rust 1.72 by @IGI-111 in #5132
- Split method application monomorphization and introduce type check finalization by @tritao in #5077
- updating documentation for u256 by @xunilrj in #5111
- Adds a
README
toforc-doc
by @eureka-cpu in #5126 - Fix issues with variables in match arm alternatives by @ironcev in #5104
- Rename and expose inputs_owner function by @SwayStar123 in #5138
- fix: take
include_tests
into account for module AST cache by @kayagokalp in #5137 - Extend primitive conversions and implement
TryFrom
trait for integer values by @bitzoic in #5127 - Adds associated types documentation. by @esdrubal in #5128
- b256 using wide ops by @xunilrj in #5102
- fix u256 at contract storage by @xunilrj in #5139
- Fix trait interface method name resolution during typechecking of
impl
by @anton-trunov in #5141 - Enable storing of a
Vec
with theStorageVec
type by @bitzoic in #5123 - Forbid bidirectional flow control characters in literals by @IGI-111 in #5146
- Bump to v0.46.1 by @kayagokalp in #5149
Full Changelog: v0.46.0...v0.46.1
v0.46.0
What's Changed
- Fix forc-fmt panic when lexing fails by @sdankel in #5011
- LSP: Don't recompile workspace when moving between files by @JoshuaBatty in #5032
- Add module AST cache. by @tritao in #4733
- ci: change rust version used by CI to v1.72.0 by @kayagokalp in #5043
- Ensure generic values used with a
StorageMap
are hashable by @bitzoic in #5045 - Fix panic in forc-fmt with special chars by @sdankel in #5014
- Add CI check to ensure forc-fmt doesn't panic by @sdankel in #5051
- Add Appendix A: Keywords to Sway book by @andrewvious in #4992
- [1645] Enhanced PackageManifest parsing by @cr-fuel in #5038
- Add
Eq
implementation forString
by @bitzoic in #5055 - Fixes assert_eq always passing for U256 by @esdrubal in #5054
- u256 bitwise and comparison operators by @xunilrj in #4947
- feat: sway-test-rs load store config & beta-4 bump by @cold-briu in #5062
- Split compilation and traversal stages by @JoshuaBatty in #5074
- Parallelize traversing AST's in the language server by @JoshuaBatty in #5001
- Accumulate typechecking methods in
impl TypeCheckContext
, part 1 by @anton-trunov in #5087 - Implement
Hash
trait forBytes
andString
types by @bitzoic in #5089 - Fix clippy warnings by @cr-fuel in #5093
- Emit compile error if a match arm variable is declared more than once by @ironcev in #5085
- Introduce the
AssetId
type by @SwayStar123 in #4955 - Accumulate typechecking methods in
impl TypeCheckContext
, part 2 by @anton-trunov in #5088 - Catch compiler panics in Sway unit tests by @anton-trunov in #5098
- Ignore patches from workspace members by @cr-fuel in #5092
- Add a "this" method to ContractId by @SwayStar123 in #5099
- Fixed formatting of
Module
doc comments by @andrewvious in #5101 - Add
new()
function toStorageKey
by @bitzoic in #5096 - Adjust existing Diagnostic API according to the Expressive Diagnostics RFC by @ironcev in #5100
- String slices by @xunilrj in #4996
- Fix Check Links tests by @bitzoic in #5112
- SwayFmt: remove {} around single imports by @brandonsurh in #5109
- Fix catch-all OR match arms by @ironcev in #5117
- Fixes generic types unification of empty structs. by @esdrubal in #5115
- Type checking refactorings and optimizations by @tritao in #5113
- Fix rename for alias and function prefixes by @sdankel in #5118
- Optimize Storage read/write api by @bitzoic in #4795
- Bump to v0.46.0 by @IGI-111 in #5120
New Contributors
- @cr-fuel made their first contribution in #5038
- @brandonsurh made their first contribution in #5109
Breaking Changes
- String literals will now return the string slice type
str
instead of a string array type, conversion to and from string arrays and slices can be done using the newly introduced intrinsics.
Full Changelog: v0.45.0...v0.46.0
v0.45.0
What's Changed
- feat: derive first account with forc-deploy after creating a wallet by @kayagokalp in #4905
- feat: forc-client points empty accounts to beta-4 faucet by @kayagokalp in #4972
- better error message for doc comment without an item by @xunilrj in #4970
- parser recovery at item level by @xunilrj in #4964
- Adds Hash trait and Hasher struct to std lib. by @esdrubal in #4701
- Optimize language server performance by @JoshuaBatty in #4961
- Removes outdated note in documentation. by @esdrubal in #4986
- Use
lsp_types
directly insway-lsp
tests instead of simulating a client withtower-lsp
by @JoshuaBatty in #4976 - Standard and core library inline documentation by @SwayStar123 in #4830
- docs: fix nft example links in docs by @kayagokalp in #4998
- Fix runnables code lens in multi-file sway projects by @sdankel in #4984
- u256 const eval and constant optimizations by @xunilrj in #4949
- Parser recovery inside trait/abi by @xunilrj in #4979
- Add beta-4 target to forc, refactor with tests, and UX improvements by @sdankel in #4991
- Fix forc-fmt extra space before scoped block by @sdankel in #5007
- Remove extra insert_trait_implementation_for_type by @anton-trunov in #5004
- Better name and doc for parser recovery by @xunilrj in #5016
- Remove outdated test which uses the dep syntax by @Braqzen in #5021
- Fix fmt panic for const inside trait and abi by @sdankel in #5009
- Fail formatting if there are syntax error nodes by @xunilrj in #5015
- Fix diagnostics in multi file projects by @sdankel in #5030
- Fix name resolution for intrinsic arguments by @anton-trunov in #5024
- Improve warnings in
match
expressions by @ironcev in #4965 - Bump to v0.45.0 by @kayagokalp in #5026
Full Changelog: v0.44.1...v0.45.0
v0.44.1
What's Changed
- parser recovery for let statements by @xunilrj in #4925
- feat: deprecate
--unsigned
flag in favor of--default-signer
forforc-deploy/run
by @kayagokalp in #4957 - feat: generate deployment artifacts with forc-deploy by @kayagokalp in #4913
- Bump to v0.44.1 by @kayagokalp in #4969
Full Changelog: v0.44.0...v0.44.1
v0.44.0
What's Changed
- feat: enable providing main arguments to a script with
forc-run
by @kayagokalp in #4603 - u256 more operations by @xunilrj in #4904
- Refactor
parse_project
to return a result. by @JoshuaBatty in #4922 - Bugfixes on enabling simplify-cfg at the end of optimizer pipeline by @vaivaswatha in #4903
- Split processing of impl methods in two phases (part 1). by @tritao in #4890
- u256 not operator by @xunilrj in #4924
- feat: show a list of accounts and their balances before selecting an account by @kayagokalp in #4771
- Fix indentation for closing brace after comment by @sdankel in #4926
- add docs CI, rename docs README to index by @sarahschwartz in #4874
- Fix formatting conditionals with comments by @sdankel in #4936
- Refactor indent utilies for readability by @sdankel in #4937
- Add benchmark framework to
sway-lsp
by @JoshuaBatty in #4927 - add std lib link to README by @andrewvious in #4938
- feat: update
forc init/new
message to point users to new docs hub by @kayagokalp in #4939 - An upgrade to
fuel-core
v0.20.3 by @xgreenx in #4821 - u256 shifts operators by @xunilrj in #4928
- docs-ci: temporarily disable check-links for exact version usages in docs by @kayagokalp in #4948
- Bump to v0.44.0 by @IGI-111 in #4945
Full Changelog: v0.43.2...v0.44.0
v0.43.2
v0.43.0
What's Changed
- Catch compiler panics in e2e tests by @anton-trunov in #4776
- Fix: const_eval bugs by @xunilrj in #4761
- Fixes missing replace_decl for variable declarations. by @esdrubal in #4777
- Fix weird formatting by @SwayStar123 in #4785
- Sway Ref: Style Guide single use variables by @Braqzen in #4664
- constcombine pass optimizing unary and binary operators by @xunilrj in #4780
- Improve error message when contract calls its own method by @anton-trunov in #4791
- stdlib: remove
decompose
function foru256
by @anton-trunov in #4802 - Improve flag library functionality by @SwayStar123 in #4793
- Add documentation for LSP with different IDEs by @sdankel in #4801
- Sway Ref: Style guide unused variables by @Braqzen in #4660
- chore: bump rust version to 1.71 by @kayagokalp in #4805
- Collect storage keyword and assign type_def to storage fields by @JoshuaBatty in #4810
- Use relatives jumps by @vaivaswatha in #4804
- Delete experimental.sw by @SwayStar123 in #4811
- Update Sway Book and ownership example to use ownership library and src-5 standard by @bitzoic in #4751
- chore: add forc-pkg codeowner by @kayagokalp in #4808
- Give more helpful error when shadowing constants by @ironcev in #4819
- Remove dependency on external library for Ownership example by @bitzoic in #4832
- ci: bump nightly rust version to 2023-04-01 by @kayagokalp in #4825
- Fixes generic trait methods not found. by @esdrubal in #4807
- Show compiler error messages for unit tests that do not compile by @anton-trunov in #4840
- Numeric type inference by @IGI-111 in #4829
- Don't force inliner in case of ref type function args by @vaivaswatha in #4823
- Collect module kind span for ParseModule by @JoshuaBatty in #4822
- Make ABI impl methods part of contract interface by @anton-trunov in #4843
- feat: forc-deploy suggests creating a new wallet if the wallet is missing by @kayagokalp in #4827
- Correct usage of terms "ABI" and "JSON ABI" by @AlicanC in #4847
- Fix clippy warnings introduced recently. by @tritao in #4853
- Update fuel-core to 0.19 by @Dentosal in #4718
- Fix flaky lsp test: publish_diagnostics_dead_code_warning by @JoshuaBatty in #4856
- assign correct semantics to struct expression name accounting for
Self
by @JoshuaBatty in #4860 - Assign correct type_defs to struct field and function param names by @JoshuaBatty in #4858
- Use the
Self
annotation in implementation blocks by @bitzoic in #4871 - chore: remove unused keys from examples under sway repo reference by @gr00vytvniks in #4854
- Update
CallPath<T>
impl ofDisplay
by @andrewvious in #4873 - SuperABIs for ABIs by @anton-trunov in #4272
- Custom on_enter LSP method by @sdankel in #4876
- Refactor compiler error handling by @IGI-111 in #4878
- Support for u256 constants by @xunilrj in #4887
- Another round of fixing warnings. by @tritao in #4888
- refactor did_* lsp notifications to log errors in server module by @JoshuaBatty in #4894
- More error handling refactoring by @IGI-111 in #4895
- Support multi-span errors and warnings by @ironcev in #4892
- Fixes replace_decls issue with nested and multiple types. by @esdrubal in #4889
- Workaround: Do not inline functions that have pointer args by @vaivaswatha in #4899
- Bump to v0.43.0 by @IGI-111 in #4897
Breaking changes
- The
std::flags
module has been improved in a non compatible fashion. - Improvements to constant folding break ABI compatibility
- Numeric conversions are no longer implicit, converting from one integer type to the other has to be explicitly done using the newly introduced methods such as
as_u8
New Contributors
- @ironcev made their first contribution in #4819
- @andrewvious made their first contribution in #4873
Full Changelog: v0.42.1...v0.43.0