Releases: FuelLabs/sway
Releases · FuelLabs/sway
v0.20.1
What's Changed
- Adds
control_flow
items tosfv2
by @eureka-cpu in #2532 - Add
forc-client
metadata toCargo.toml
by @mohammadfawaz in #2577 - Bump to
v0.20.1
by @mohammadfawaz in #2578
Full Changelog: v0.20.0...v0.20.1
v0.20.0
What's Changed
- Switch between viewing typed or parsed tokens as warnings in the LSP client. by @JoshuaBatty in #2460
- 2474/generic repo name by @denizsurmeli in #2476
- Rename
Engine
toTypeEngine
and thetype_engine
dir totype_system
by @emilyaherbert in #2484 - Some preparation for function calls. by @otrho in #2471
- refactor: move build logic to
forc-pkg
fromforc
by @kayagokalp in #2478 - Add
expr
formatting tosway-fmt-v2
by @eureka-cpu in #2338 - Move
test
project toclap
by @AlicanC in #2470 - Use rust 1.62 in CI docker image by @sezna in #2506
- Removes outdated
todo
comments insfv2
by @eureka-cpu in #2503 - 2421/no main args by @denizsurmeli in #2472
- Misc cleanups in the parser by @Centril in #2480
- Fix DCA for used struct/enum function parameters. by @tritao in #2468
- Changes
.clone().into_inner()
to.get()
insfv2
by @eureka-cpu in #2504 - Fix link to Forc reference in the repo by @bingcicle in #2513
- Add minimum Forc version to manifest by @kayagokalp in #2405
- Collect
TypedStructField
tokens in the language server. by @JoshuaBatty in #2488 - Fix new clippy lints (with rust version 1.63) by @kayagokalp in #2518
- Add separate expression kind types by @canndrew in #2507
- Temporarily disable the 3 LSP tests that open a file by @JoshuaBatty in #2519
- Remove send address check by @joerlop in #2510
- Adds
ItemUse
tosway-fmt-v2
by @eureka-cpu in #2295 - Add Outer DocComment Parsing by @AlicanC in #2516
- Convert while loops to be an expression instead of a statement by @tritao in #2517
- Add pointers to IR and implement mutable parameters. by @tritao in #2363
- fix: Incorrect call parameter should be a compiler error by @kayagokalp in #2526
- fix: Setting the contract ID in an abi cast to a storage access fails to compile by @kayagokalp in #2529
- Fix support for parser recovery by @Centril in #2527
- Organize imports in
sfv2
by @eureka-cpu in #2502 - Fix:
Impl
formatting without generics generates unparsable output by @kayagokalp in #2523 - Adds multiline formatting for
match
statements insfv2
by @eureka-cpu in #2530 - Create markdown-lint.yml by @adlerjohn in #2534
- break and continue are not items by @canndrew in #2536
- Check for self parameters in free functions. by @tritao in #2538
- Store the variable decl Ident in VariableExpression and pass on the type_ascription_span by @JoshuaBatty in #2544
- Documentation for
ref mut
in the Sway Book by @mohammadfawaz in #2542 - Annotate TypeFields by @AlicanC in #2528
- Intrinsics for the VM's storage opcodes. by @vaivaswatha in #2508
- Update 'Sway toolchain' references to 'Fuel toolchain' where appropriate by @bingcicle in #2545
- [simplify-cfg] Separate
remove_dead_blocks
frommerge_blocks
by @vaivaswatha in #2548 - Diagnose Unrecognized Annotations by @AlicanC in #2547
- Speed improvements and bug fixes for
simplify-cfg
. by @vaivaswatha in #2560 - Adds better formatting to
match_branch_kind
by @eureka-cpu in #2539 - Split client interaction commands into a forc-client plugin by @kayagokalp in #2440
- Adds formatting for
if_else
control flow blocks by @eureka-cpu in #2564 - Adds multiline formatting for
fn_signature
insfv2
by @eureka-cpu in #2566 - Update forc plugin docs with a note on multi-command plugins by @mitchmindtree in #2521
- Provide LSP extension for printing the parsed or typed AST in VS Code by @JoshuaBatty in #2570
- Fix bug in serializing strings for storage by @vaivaswatha in #2571
- Fix some issues with
ref mut
parameters by @tritao in #2563 - Fixing the defaults for
forc new
by @mohammadfawaz in #2573 - New JSON ABI format supporting generics by @mohammadfawaz in #2524
- Introduce configuration-time constants in
Forc.toml
by @sezna in #2549 - Bump to
v0.20.0
by @emilyaherbert in #2565
New Contributors
- @denizsurmeli made their first contribution in #2476
- @joerlop made their first contribution in #2510
Full Changelog: v0.19.2...v0.20.0
v0.19.2
What's Changed
- Adds
LineStyle
toShape
by @eureka-cpu in #2390 - Adds
impl
formatting tosfv2
by @eureka-cpu in #2403 - Add a new 'simplify CFG` optimisation pass. by @otrho in #2436
- Enhancements to the
Contracts
section in the Sway Book by @mohammadfawaz in #2434 - Removed angle bracket trait from sway-fmt-v2 by @gr00vytvniks in #2417
- Fix a bug in the IR parsing. by @otrho in #2442
- Add an option to print the typed program AST. by @tritao in #2444
- Implement a runnables custom method and collect typed tokens by @JoshuaBatty in #2441
- Add an overall description to the
simplify-cfg
IR pass. by @otrho in #2446 - Move the
SWAY_GIT_TAG
fromforc
intoforc-pkg
by @mitchmindtree in #2448 - Refactor E2E test runner to run FileCheck on compile category tests. by @tritao in #2450
- Moves out the AST definitions from
sway_parse
intosway_ast
by @Centril in #2438 - Fix DCA for constant declaration value expressions. by @tritao in #2461
- Identify types suited only for storage and find incorrect decls by @vaivaswatha in #2453
- Send the program kind along with the range to the client code_lens request by @JoshuaBatty in #2459
- bump sdk version to v0.20 in stdlib tests and forc by @nfurfaro in #2466
- Bump to
v0.19.2
by @mohammadfawaz in #2481
New Contributors
Full Changelog: v0.19.1...v0.19.2
v0.19.1
What's Changed
- Provide intrinsic
__addr_of
. by @vaivaswatha in #2371 - Forc init appends to .gitignore rather than overriding it by @kayagokalp in #2406
- Collect more tokens in the language server and store definitions by @JoshuaBatty in #2409
- Refactor
sway-fmt-v2
: remove and implement old todos & add where comment handling & code clean-up by @kayagokalp in #2416 - Rely on
is_copy_type
to lowerinsert_element
/extract_element
into asm instead of type size by @mohammadfawaz in #2418 - Fix parse tree regression handling while loop body implicit returns. by @tritao in #2414
- General code quality enhancements to the standard library by @mohammadfawaz in #2431
- Additional checks for unnecessary visibility qualifier (ABI definitions, ABI impls and trait impls) by @kayagokalp in #2432
- Bump to
v0.19.1
by @mohammadfawaz in #2437
Full Changelog: v0.19.0...v0.19.1
v0.19.0
What's Changed
- Add
is_terminated
check before compiling return statements to IR by @mohammadfawaz in #2312 - Add means of comment formatting to
sway-fmt-v2
by @kayagokalp in #2229 - Introduce the
TypeBinding
type by @emilyaherbert in #2195 - Don't forward too much gas in the reentrancy test by @mohammadfawaz in #2323
- Refactor coins_owner by @nfurfaro in #2317
- StorageVec by @SwayStar123 in #2048
- Bugfix in rsh method for b256 by @nfurfaro in #2316
- Adds
ItemTrait
tosway-fmt-v2
by @eureka-cpu in #2294 - refactor: refactor call_frames to use registers read function by @matt-user in #2296
- Switch the order of the fields for
Option
fromSome
followed byNone
toNone
followed bySome
by @Braqzen in #2328 - Switch
forc new
to create a test that uses a wallet with some coins in it by @mohammadfawaz in #2332 - Fix for
storage
initializers insway-fmt-v2
by @eureka-cpu in #2329 - Add a test to verify the order of
Option
variants by @Braqzen in #2334 - update increment contract to new-style storage by @sezna in #2336
- Add
int_to_ptr
IR instruction by @mohammadfawaz in #2335 - Improve opt binary in
sway-ir
. by @otrho in #2342 - Fix bug in translating
if-let
without anelse
tomatch
. by @vaivaswatha in #2344 - Fix utf8 related bug in computing window for errors and warnings. by @vaivaswatha in #2343
- Simplify function IR generation by @tritao in #2330
- Add a new
__gtf
intrinsic by @mohammadfawaz in #2315 - Remove
StorageVec
from missing features in the Sway Book by @mohammadfawaz in #2352 - Fix
Span
end for unclosed multiline comments and unclosed string literals by @mohammadfawaz in #2354 - Attempt to workaround unused-deps CI error by updating mdbook to 0.4.20 and applying upstream patch by @mitchmindtree in #2360
- Fix lexing of multiline comments to include the trailing '/' by @mitchmindtree in #2359
- Parse tokens from all dependencies instead of single files in the language server by @JoshuaBatty in #2346
- StorageVec fixing issues and adding features by @SwayStar123 in #2345
- Move
std::assert::require
tostd::revert::require
by @AlicanC in #2285 - Inserting Comments by @kayagokalp in #2311
- Return the local struct Span as a new field on
TypedExpressionVariant::StructExpression
by @JoshuaBatty in #2380 - Deprecate forc gm by @bingcicle in #2382
- Store the enum instantiation span within the EnumInstantiation variant by @JoshuaBatty in #2388
- Set the CallPath prefix of
FunctionApplication
to call_path_binding suffix by @JoshuaBatty in #2389 - Fix concurrency bug in ConcurrentSlab.replace. by @tritao in #2378
- "Common Collections" in the Sway Book by @mohammadfawaz in #2370
- Generalise IR metadata. by @otrho in #2394
- Check for function parameters with an already used identifier. by @tritao in #2395
- Bump to
v0.19.0
by @mohammadfawaz in #2393
Full Changelog: v0.18.1...v0.19.0
v0.18.1
What's Changed
- Adds
ItemFn
formatting tosway-fmt-v2
by @eureka-cpu in #2173 - Expose a function that clears the type engine by @mohammadfawaz in #2290
- Check for unnecessary visibility qualifier in trait items. by @tritao in #2276
- Collect tokens into a
HashMap
instead of aVec
in the language server. by @JoshuaBatty in #2121 - Change verbosity from debug -> info in forc init by @ra0x3 in #2244
- Some fixes to the Sway Book by @mohammadfawaz in #2293
- Call
sway_core::clear_lazy_statics
at the beginning of build and check by @JoshuaBatty in #2302 - Bump
tower-lsp
dep to the latest version by @JoshuaBatty in #2301 - Cover arrays of generics in JSON ABI by handling their type arguments by @mohammadfawaz in #2303
- Bump to v0.18.1 by @mohammadfawaz in #2304
Full Changelog: v0.18.0...v0.18.1
v0.18.0
What's Changed
- const_eval can try (recursively) compile unresolved decls by @vaivaswatha in #2196
- Update author entry in manifest test for
e2e/.../language/modulo_uint_test
by @Braqzen in #2200 - Warning about using zero address as ownership in SwayBook by @bitzoic in #2127
- Check for unknown file check directives and fix a broken test. by @tritao in #2185
- Add
std::tx::get_predicate_data
by @camsjams in #1984 - #2205 - Use ZERO_B256 const to initialize BASE_ASSET_ID const by @r-sitko in #2206
- Bump fuel-core to v0.9.4. by @adlerjohn in #2023
- Add
parsed_to_ast
fn insway_core
by @JoshuaBatty in #2210 - Refactor std::tx by @simonr0204 in #2142
- add
remove
,insert
andpop
toVec
by @xffxff in #2170 - Remove duplicate check to length of function arguments by @emilyaherbert in #2201
- Move all the
sway_to_ir
tests fromsway_core
to the integration tests. by @otrho in #2211 - Add the
SMO
opcode tosway-core
by @Braqzen in #2178 - add input/output type constants to std-lib by @simonr0204 in #2187
- Add a
tx_id()
function to std::tx by @nfurfaro in #2214 - Fix pointer types and use
std::mem
onstd::tx
by @AlicanC in #2208 - Swap order of operands for
std::mem::copy
by @AlicanC in #2216 - Add
Span
tobreak
andcontinue
declarations by @mohammadfawaz in #2213 - #2219 - get_coins_owner() renamed to coins_owner() by @r-sitko in #2222
- Add storage formatting to sway-fmt-v2 by @kayagokalp in #2124
- Fix
from
inevm_address
to make amut
local copy of thebits
argument before callingmcli
by @mohammadfawaz in #2227 - Check for calling of associated functions as method calls. by @tritao in #2198
- Turn
CallPath
into a wrapper type by @emilyaherbert in #2191 - Fix and clean up forc reference docs. by @adlerjohn in #2233
- Switch the check if an IR block is terminated by a branch to just be a check if terminated at all. by @otrho in #2221
- Add 'Ty' formatting to
sway-fmt-v2
by @kayagokalp in #2168 - Correctly display DCA warnings and fix some incorrect warnings that showed up by @mohammadfawaz in #2230
- Type arguments in JSON ABI and the function selector by @mohammadfawaz in #2218
- Update the new ir_generation test suite a bit. by @otrho in #2223
- Fix CI: Avoid using
then_some
because it's "unstable" by @mohammadfawaz in #2236 - Add swap method to Vec by @r-sitko in #2231
forc-pkg
: RefactorBuildPlan
construction and validation to minimize fetching, improve offline support, reduce I/O, fix bugs. by @mitchmindtree in #2234- Bump
openssl-src
to 111.22. by @adlerjohn in #2250 - improvement(formatter): Enums and Structs are formatted to a single line first before getting their length to determine multiline formatting by @kayagokalp in #2212
- Update
sway-fmt-v2
with newTy
formatting and replacepush_str
withwrite!
by @eureka-cpu in #2255 - Add
tx_input_owner()
function to std. by @nfurfaro in #2215 - Fix broken link to the instruction set spec in the Sway Book by @mohammadfawaz in #2270
- Remove unsupported LSP Capabilities by @JoshuaBatty in #2262
- Return a
CompileResult
& aCompileAstResult
fromforc_pkg::check
by @JoshuaBatty in #2220 - forc-pkg: Improve error handling around removed path deps and patches by @mitchmindtree in #2209
- Account for characters that are larger than 1 byte when displaying warnings and errors by @mohammadfawaz in #2267
- feat: struct destructuring by @matt-user in #2243
- Remove
Spanned
and addFormat
trait toPunctuated
by @eureka-cpu in #2269 - Fix some small issues in compiling load and store IR instructions when the word offset is > 4096 by @mohammadfawaz in #2252
- Some code golf by @mohammadfawaz in #2271
- Make storage initializers required, just like local variables by @mohammadfawaz in #2278
- Bump to fuels 0.17.0 by @mohammadfawaz in #2273
- Bump to v0.18.0 by @mohammadfawaz in #2268
New Contributors
- @camsjams made their first contribution in #1984
- @matt-user made their first contribution in #2243
Full Changelog: v0.17.0...v0.18.0
v0.17.0
What's Changed
- Add struct formatting to sway-fmt-v2 by @kayagokalp in #2058
- internal: Reduce amount of String::new() in sway-fmt-v2 by @xffxff in #2111
- examples: fix renaming to BASE_ASSET_ID in comment by @Wondertan in #2120
- Added storage field alignment threshold to formatter config by @kayagokalp in #2113
- Enable storage initializers and emit a storage initialization JSON by @mohammadfawaz in #2078
- Improve reserved keywords checking and add support for raw identifiers. by @tritao in #2066
- remove
fuels-abigen-macro
dependency by @Salka1988 in #2007 - Adds
Generics
handling tosway-fmt-v2
by @eureka-cpu in #2110 - #2020 - changed BASE_ASSET_ID type to ContractId by @r-sitko in #2137
- #2039 - add storage keyword highlighting in book by @r-sitko in #2141
- Add the U256 type by @nfurfaro in #2103
- sway-fmt-v2 formatting should use tokens directly from sway-parse by @kayagokalp in #2097
- Move monomorphization conceptually inside of the type engine by @emilyaherbert in #2093
forc-pkg
- Don't add transitive deps (besidescore
) to a package's initial namespace by @mitchmindtree in #2136- Demonstrate that
T
forVec
can now be inferred by arguments by @emilyaherbert in #2132 - Remove unnecessary "core" str check in
Span::join
by @mitchmindtree in #2156 - Update the book to explicitly mention that
impl
functions can't call each other yet. by @otrho in #2160 - Remove duplicate CI checks that already have dedicated jobs by @mitchmindtree in #2161
- Speedup
find_dead_code
pass in control flow analysis by @mitchmindtree in #2159 - const initialization: a few fixes by @vaivaswatha in #2158
- Update broken link for contributing to Sway in README.md by @mohammadfawaz in #2172
- Backport improvements to
U128
type. by @nfurfaro in #2169 - Introduce
__eq
intrinsic by @vaivaswatha in #2100 - Improvements around
forc plugins
command by @tritao in #1969 - Updates
user_def
withFieldAlignment
& fix corresponding use cases by @eureka-cpu in #2153 - Add
lex_commented
andCommentedTokenStream
tosway_parse
by @mitchmindtree in #2123 - Remove unused field
const_decl_origin
fromTypedVariableDeclaration
by @vaivaswatha in #2181 - create
ZERO_B256
const by @r-sitko in #2162 - #2177 - Use assert_eq instead of assert in sway-fmt-v2 tests by @r-sitko in #2182
- Fix new clippy lints. by @sezna in #2192
- Fix checking for too many function call arguments. by @tritao in #2096
- chore: use
concurrency
to cancel previous CI runs by @AlicanC in #2194 - Rely on
is_copy_type
when compilingload
andstore
intoasm
by @mohammadfawaz in #2189 break
andcontinue
by @mohammadfawaz in #2112- Bump
sway-core
to usefuel-asm
version0.6
by @Braqzen in #2193 - Distinguish between
forc init
andforc new
(Copy over changes from PR#1669) by @ra0x3 in #2175 - Bump to v0.17.0 by @mohammadfawaz in #2174
New Contributors
- @xffxff made their first contribution in #2111
- @Salka1988 made their first contribution in #2007
- @r-sitko made their first contribution in #2137
Full Changelog: v0.16.2...v0.17.0
v0.16.2
What's Changed
- Small nits in the standard library by @mohammadfawaz in #2038
- Remove extra "the" by @SwayStar123 in #2042
- Run
cargo update
. by @adlerjohn in #2045 - sway-fmt-v2 adds program type to the output by @kayagokalp in #1997
- Fix couple of bugs in handling returns in if blocks by @vaivaswatha in #2029
- Config driven E2E testing. by @otrho in #2003
- Handle enums and their impls for item imports by @mohammadfawaz in #2034
- Add
Identity
type to Sway Book by @bitzoic in #2041 - Improve struct patterns with new warnings and rest pattern support. by @tritao in #2032
- Add the concept of semantic similarity to the type system by @emilyaherbert in #1958
- Some updates to the known issues section by @mohammadfawaz in #2060
- Constants formatting for sway-fmt-v2 by @kayagokalp in #2021
- Update the check for unresolved types. by @emilyaherbert in #2057
- Make
resolve_type_with_self
andresolve_type_without_self
takeTypeId
's instead ofTypeInfo
's by @emilyaherbert in #1982 - Bump non-transitive
dashmap
to v5.3.4. by @adlerjohn in #2062 - comby-rust by @rakita in #2065
- Adds
attribute
handling tosway-fmt-v2
by @eureka-cpu in #2061 - Introduce a type check
Context
. ReplacesTypeCheckArguments
. by @mitchmindtree in #2004 - Add
forc check
command by @JoshuaBatty in #2026 - Small fixes to the
storage_map
example by @mohammadfawaz in #2079 - Move
TypeArgument
,TypeParameter
, andTraitConstraints
to be conceptually inside of the type engine by @emilyaherbert in #2074 - Ensure lock is applied when
BuildPlan
validation would require changes by @mitchmindtree in #2090 - Add conceptual distinction between replacing
TypeInfo::Self
and monomorphization by @emilyaherbert in #2017 - Add
abi
handling tosway-fmt-v2
by @eureka-cpu in #2044 - Refactor
forc_pkg::BuildConfig
->BuildProfile
, fix CLI arg handling by @mitchmindtree in #2094 - Update all the E2E should_fail tests to verify their output. by @otrho in #2082
- forc: Improve the
print_*_asm
CLI option docs by @mitchmindtree in #2095 - update fuelup related instructions by @binggh in #2099
- Adding
--time-phases
toforc build
by @seem-less in #2091 - Add forc feature for overriding packages in the package graph, akin to cargo's [patch] feature by @kayagokalp in #1836
- Bump to v0.16.2 by @mohammadfawaz in #2105
New Contributors
Full Changelog: v0.16.1...v0.16.2
v0.16.1
What's Changed
- Make sure that reallocating zero sized allocations works as expected by @mohammadfawaz in #2013
- remove WIP note on storage attributes by @sezna in #2016
- Remove known issues that have been resolved from the Sway Book by @mohammadfawaz in #2019
- Improve span for missing tokens at the end of a scope by @mohammadfawaz in #1973
- Fix unnecessary check inside of the match exhaustivity algorithm by @emilyaherbert in #2009
- Support
+=
and other similar operators for storage accesses by @mohammadfawaz in #1970 - stdlib
Vec
by @adlerjohn in #1118 - Enum formating for sway-fmt-v2 by @kayagokalp in #1962
- Minor fix to test warning. by @adlerjohn in #2024
- Split book into latest and master. by @adlerjohn in #2025
- Add
attribute
toutils
by @eureka-cpu in #2011 - Added Eq for identity by @Braqzen in #2028
- Bump to v0.16.1 by @mohammadfawaz in #2037
Full Changelog: v0.16.0...v0.16.1