v0.27.0 - 23 Sep 2022
<!-- Release notes generated using configuration in .github/release.yml at v0.27.0 -->
What's Changed
This release contains a brand new framework for writing tests in Cadence, new standard library features, and many performance improvements.
⭐ Features
- Add testing framework for Cadence by @SupunS in https://github.com/onflow/cadence/pull/1923
- Make paths equatable by @dreamsmasher in https://github.com/onflow/cadence/pull/1911
- Add String.fromUTF8 for conversion from [UInt8] by @dreamsmasher in https://github.com/onflow/cadence/pull/1927
🛠 Improvements
- Optimize and make visitor generic by @turbolent in https://github.com/onflow/cadence/pull/1907
- Improve the AST visitor further by @turbolent in https://github.com/onflow/cadence/pull/1919
- Remove values from tokens, make all code byte slices by @turbolent in https://github.com/onflow/cadence/pull/1930
- Use WriteByte instead of WriteRune by @turbolent in https://github.com/onflow/cadence/pull/1944
- Export environment checker and interpreter config to allow customization by @turbolent in https://github.com/onflow/cadence/pull/1910
- Refactor activations to be truly generic by @turbolent in https://github.com/onflow/cadence/pull/1945
- Move the
fail()
function to native implementation by @SupunS in https://github.com/onflow/cadence/pull/1960 - Update wasmtime-based VM by @turbolent in https://github.com/onflow/cadence/pull/1946
- Optimize type ID generation, remove location ID by @turbolent in https://github.com/onflow/cadence/pull/1932
- Export functionality required by debugger by @turbolent in https://github.com/onflow/cadence/pull/1924
- Add method to get function value's sema function type by @turbolent in https://github.com/onflow/cadence/pull/1991
- Improve type information in interpreter errors by @turbolent in https://github.com/onflow/cadence/pull/1994
- [LS] General improvements by @sideninja in https://github.com/onflow/cadence/pull/1877
- [LS] Update to Cadence v0.26.0 by @turbolent in https://github.com/onflow/cadence/pull/1970
- [Test Framework] Remove test-framework field from interpreter by @SupunS in https://github.com/onflow/cadence/pull/1886
- [Test Framework] Move matcher implementation to cadence by @SupunS in https://github.com/onflow/cadence/pull/1895
- [Test Framework] Refactor and cleanup the test-stdlib by @SupunS in https://github.com/onflow/cadence/pull/1897
- [Test Framework] Start development of Cadence test framework by @SupunS in https://github.com/onflow/cadence/pull/1827
- [Test Framework] Add support for importing and initializing contracts by @SupunS in https://github.com/onflow/cadence/pull/1832
- [Test Framework] Use FVM as the environment provider for test runner by @SupunS in https://github.com/onflow/cadence/pull/1835
- [Test Framework] Add transaction execution support by @SupunS in https://github.com/onflow/cadence/pull/1849
- [Test Framework] Run setup/teardown before/after tests by @SupunS in https://github.com/onflow/cadence/pull/1864
- [Test Framework] Add support for loading programs from local files by @SupunS in https://github.com/onflow/cadence/pull/1869
- [Test Framework] Add helper function for contract deployment by @SupunS in https://github.com/onflow/cadence/pull/1868
- [Test Framework] Add initial support for Matchers by @SupunS in https://github.com/onflow/cadence/pull/1863
- [Test Framework] Provide a way to specify addresses for the imports by @SupunS in https://github.com/onflow/cadence/pull/1893
- [Test Framework] Update Cadence by @turbolent in https://github.com/onflow/cadence/pull/1955
- [Test Framework] Separate import resolver and file resolver by @SupunS in https://github.com/onflow/cadence/pull/1954
🐞 Bug Fixes
- Make missing casting expression a user error by @turbolent in https://github.com/onflow/cadence/pull/1914
- [LS] Multiple language server bugfixes by @sideninja in https://github.com/onflow/cadence/pull/1950
- Fix command-line runner by @turbolent in https://github.com/onflow/cadence/pull/1915
- Fix unnecessarily specific cast in storage iteration by @dsainati1 in https://github.com/onflow/cadence/pull/1984
- Don't print large integers in error messages by @SupunS in https://github.com/onflow/cadence/pull/1987
- Track potential jumps, ignore resource invalidations which are only potential by @SupunS in https://github.com/onflow/cadence/pull/1979
- Fix batch script by @turbolent in https://github.com/onflow/cadence/pull/1996
- Define standard library values in analysis by @turbolent in https://github.com/onflow/cadence/pull/1997
📖 Documentation
- docs: add security best practices by @alxflw in https://github.com/onflow/cadence/pull/1887
- Add description to interpreter.Value by @turbolent in https://github.com/onflow/cadence/pull/1920
- Docs: implement flow-docs.json to control sidebar and other docs content by @schpet in https://github.com/onflow/cadence/pull/1909
- Add meeting notes for August 30, 2022 by @turbolent in https://github.com/onflow/cadence/pull/1928
- Clarify that updating a contract does not change stored data by @turbolent in https://github.com/onflow/cadence/pull/1953
- Fixed result given by slice by @tromex in https://github.com/onflow/cadence/pull/1957
- Update FAQ by @turbolent in https://github.com/onflow/cadence/pull/1947
- DOCS: Fix line about storable fields in composite types by @alilloig in https://github.com/onflow/cadence/pull/1965
- update playground tutorials by @MrDSGC in https://github.com/onflow/cadence/pull/1964
- Add meeting notes for extensions meeting by @dsainati1 in https://github.com/onflow/cadence/pull/1989
- fix error in Script-Accessible report example by @gus-labs in https://github.com/onflow/cadence/pull/1975
- Interface Default Functions status by @ph0ph0 in https://github.com/onflow/cadence/pull/1976
- [Test Framework] Add documentation for testing framework by @SupunS in https://github.com/onflow/cadence/pull/1900
- Add status callout for the test framework docs by @SupunS in https://github.com/onflow/cadence/pull/2000
🧪 Testing
- Add test case to check optional-chaining argument evaluation order by @turbolent in https://github.com/onflow/cadence/pull/1925
Chores
- Remove broken CI checks by @schpet in https://github.com/onflow/cadence/pull/1908
- Sync test-framework branch with master by @SupunS in https://github.com/onflow/cadence/pull/1921
- Remove test-framework module by @SupunS in https://github.com/onflow/cadence/pull/1963
- Remove outdated prettier plugin by @turbolent in https://github.com/onflow/cadence/pull/1967
- Remove languageserver module from the cadence repo by @SupunS in https://github.com/onflow/cadence/pull/1981
- Remove docgen module by @SupunS in https://github.com/onflow/cadence/pull/1980
- Improve linting errors on CI by @turbolent in https://github.com/onflow/cadence/pull/1998
- [LS] Release npm cadence-language-server v0.26.1 by @sideninja in https://github.com/onflow/cadence/pull/1962
- [Test Framework] Sync test framework branch with master by @SupunS in https://github.com/onflow/cadence/pull/1829
New Contributors
- @schpet made their first contribution in https://github.com/onflow/cadence/pull/1908
- @tromex made their first contribution in https://github.com/onflow/cadence/pull/1957
- @MrDSGC made their first contribution in https://github.com/onflow/cadence/pull/1964
- @gus-labs made their first contribution in https://github.com/onflow/cadence/pull/1975
- @ph0ph0 made their first contribution in https://github.com/onflow/cadence/pull/1976
Full Changelog: https://github.com/onflow/cadence/compare/v0.26.2...v0.27.0
[Changes][v0.27.0]
<a name="v0.26.2"></a>