What's Changed
- fix(formatter): fix else indentation after comment between if-else by @bingcicle in #3785
- Disables usage of parenthesis in unit enum variants. by @esdrubal in #3743
- Show dead code with reduced opacity by @sdankel in #3800
- Add index file navigation to
forc doc
by @eureka-cpu in #3778 - Fix typeo in
std::contract_id
by @eureka-cpu in #3821 - Add a flag to print
Log
andLogData
receipts emitted from tests by @kayagokalp in #3808 - Extend support for Input::Message type fields in std::inputs by @nfurfaro in #2707
- Fix order of logs such that they are printed after tested function name by @kayagokalp in #3828
- Replace runnables custom fn with LSP codeLens by @sdankel in #3819
- Disallow returning
StorageMap
andStorageVec
from contract methods and standalone functions by @anton-trunov in #3826 - Align asm opcodes to 4 chars in formatter by @anton-trunov in #3823
- Disallow repeated symbols where applicable by @mohammadfawaz in #3690
- Introduce a
context
toconvert_parse_tree
by @mohammadfawaz in #3682 - Add sha256 and keccak256 hash functions to
Bytes
type by @bitzoic in #3822 - Fixed
self
in trait methods by @gr00vytvniks in #3832 - feat: forc-fmt workspace support by @kayagokalp in #3851
- Add additional sections under
Libraries
by @mehtavishwa30 in #3786 - Add docstring previews to index files by @eureka-cpu in #3848
- Add spans to compiler errors to prevent their incorrect deduplication by @anton-trunov in #3838
- Fix the bug regarding methods not being found for types. by @emilyaherbert in #3866
- feat: error out if more than one package declares the same package name in a workspace by @kayagokalp in #3840
- Add missing tokens inside turbofish by @IGI-111 in #3847
- Refactor and fix
collect_types_metadata
forTyProgram
by @mohammadfawaz in #3839 - Small reorganisation of asm_generation/fuel. by @otrho in #3872
- feat: inject contract id into the namespace for tests automatically by @kayagokalp in #3729
- Remove decl engine cloning for built package generation by @kayagokalp in #3867
- Fix bug in "Advanced Calls" section in Sway book by @mehtavishwa30 in #3874
- Update
std::storage::get
andstd::storage::StorageMap::get
to return anOption
by @mohammadfawaz in #3862 - Add a
--locked
arg to more invocations ofcargo
in the CI. by @otrho in #3884 - Refactor doc strings in
sway-lib-std
by @gr00vytvniks in #3870 - chore: change type of
module_info
field onRenderedDocument
toModuleInfo
by @eureka-cpu in #3846 - feat: Adds Markdown formatting to item previews in
forc doc
by @eureka-cpu in #3869 - Bump SDK to 0.34 by @nfurfaro in #3879
- Fix CI by installing
forc
with--locked
flag. by @tritao in #3888 - Fix bug with replacing the self type. by @emilyaherbert in #3881
- Impl From for Bytes by @nfurfaro in #3889
- Improve performance of
AbstractInstructionSet::verify(self)
by @mohammadfawaz in #3898 - Run
cargo clippy --fix
in the sway repo by @nfurfaro in #3903 - Add
ops::*
to the prelude incore
by @emilyaherbert in #3892 - Format
sway-lib-core
andsway-lib-std
by @nfurfaro in #3902 - feat(fmt): allow a single file for
--path
by @bingcicle in #3858 - Add run button for sway tests by @sdankel in #3849
- I'm not really the owner of
sway-lib-*
. by @otrho in #3906 - Add a TryFrom trait by @nfurfaro in #3899
- Improve performance of the register allocator (4.5X) by @mohammadfawaz in #3909
- Rename Shiftable trait by @nfurfaro in #3901
- Refactor Fuel JSON ABI generation into its own module. by @tritao in #3911
- Better token handling inside turbofish by @IGI-111 in #3883
- Add an
assert_eq
function tostd::assert
by @nfurfaro in #3912 - update installation instructions, add link to forum by @camiinthisthang in #3890
- Fix handling of empty code blocks by @eureka-cpu in #3915
- Bytes: refactor & rename
join
toappend
by @nfurfaro in #3895 - Add
logging::log
&assert::assert_eq
toprelude.sw
by @Braqzen in #3916 - Improve performance of liveness analysis in the register allocator (4.3X) by @mohammadfawaz in #3913
- Introduce
__state_clear
,std::storage::clear
, andstd::storage::StorageMap::remove
by @mohammadfawaz in #3876 - Rename
std::math::Exponentiate
trait by @Braqzen in #3919 - feat(fmt): introduce formatting comments together with src by @bingcicle in #3854
- Allow go to definition on traits by @IGI-111 in #3907
- Fix handling of empty documents by @eureka-cpu in #3930
- Remove debugging statement. by @tritao in #3931
- [bug] U128.pow. n.pow(two) still equals n by @rostyslavtyshko in #3921
- docs: update swayfmt contributing by @bingcicle in #3936
- Bump
toml-edit
andtower-lsp
to latest versions by @JoshuaBatty in #3933 - Continue EVM backend development by @tritao in #3932
- Helper method: Write all AST's to disk by @JoshuaBatty in #3922
- Refactor
forc-client
in preparation for newforc submit
command by @mitchmindtree in #3941 - Change
expect
messages toResult
inforc doc
by @gr00vytvniks in #3691 - refactor(fmt): make
CommentMap
a newtype by @bingcicle in #3940 - Optimizations to the match exhaustivity checking algorithm by @emilyaherbert in #3905
- Traverse IR blocks using a reverse post order traverse of the CFG by @mohammadfawaz in #3942
- Temporarily remove
assert_eq
from the standard library by @mohammadfawaz in #3962 - Bump to
v0.34.0
by @mohammadfawaz in #3943 - Update to latest etk/pest. by @tritao in #3965
Breaking Changes
- It is no longer allowed to instantiate
enum
variants of unit type using parentheses. For example,Option::None()
is now a compile error and should be replaced withOption::None
. - The function
std::storage::get(key: b256)
now returns anOption
. If no value was previously stored at the key,Option::None
is returned. Otherwise,Option::Some(value)
is returned, wherevalue
is the value previously stored atkey
. - The method
StorageMap::get(self, key: K)
now returns anOption
. If no value was previously stored atkey
,Option::None
is returned. Otherwise,Option::Some(value)
is returned, wherevalue
is the value previously stored atkey
. - The methods
split
andjoin
ofstd::bytes::Bytes
have been renamed tosplit_at
andappend
. - The trait
std::math::Exponentiate
has been renamed tostd::math::Power
.
Full Changelog: v0.33.1...v0.34.0