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