Skip to content

Releases: onflow/cadence

v0.12.0

15 Dec 23:03
Compare
Choose a tag to compare

⭐ Features

  • Add getType function (#493): It is now possible to get the run-time type of a value
  • Flush the cache of the storage before querying the used storage amount (#480)
  • Structured type identifiers (#477)
  • Allow host environment to predeclare values, predicated on location (#472)
  • Add a visitor for interpreter values (#449)
  • Add support for imports in WASM writer and reader (#368)
  • Add support for coverage reports (#465)
  • Add storage fields to accounts (#439)
  • Implement fmt.Stringer for cadence.Value (#434)
  • Add a function to parse a literal with a given target type (#417)

πŸ›  Improvements

  • Extend event parameter types and dictionary key types (#497)
  • Optimize composite and interface static types (#489)
  • Optimize composite values (#488)
  • Fix the export of static types (#487)
  • Improve error pretty printing (#481)
  • Improve fixed-point multiplication and division (#490)
  • Improve error messages for contract deployment name argument checks (#475)
  • Add a test for decoding a struct with an address location without name (#469)
  • Refactor address locations, make composite decoding backwards-compatible (#457)
  • Improve error message when there are constructor argument (#455)
  • Make AST thread-safe (#440)
  • Add position information to interpreter errors (#424)

🐞 Bug Fixes

  • Declare new contract's nested values before evaluating initializer (#504)
  • Infer address location name from type ID for static types (#468)
  • Fix optional value's type function (#458)
  • Don't use the cache when deploying or updating account code (#447)
  • Properly handle unspecified variable kind (#441)
  • Prevent resource loss in failable downcasts (#426)

πŸ’₯ Breaking Changes

This release contains no source-breaking changes for Cadence programs, but the following breaking changes when embedding Cadence:

  • Structured type identifiers (#477)
  • Add error return value to all interface methods (#470)

πŸ“– Documentation

  • Document that references are not storable and suggest using capabilities (#478)
  • Update the diagram illustrating the architecture of the runtime (#476)
  • Document the current options for syntax highlighting (#444)

v0.10.4

09 Dec 23:57
Compare
Choose a tag to compare

πŸ›  Improvements

  • Allow non-fatal errors for all interface functions (#494, #495)
  • Panic with array index out of bounds error (#496)

v0.10.3

04 Dec 17:15
Compare
Choose a tag to compare

⭐ Features

  • Add storage fields to accounts (#485)

πŸ›  Improvements

  • Flush the cache of the storage before querying the used storage amount (#486)

v0.11.2

30 Nov 18:33
Compare
Choose a tag to compare

⭐ Features

  • Extended debug (#464)

πŸ›  Improvements

  • Refactor address locations, make composite decoding backwards-compatible (#461)

v0.10.2

23 Nov 20:37
922f49a
Compare
Choose a tag to compare

⭐ Features

  • Extended debug (#463)

πŸ›  Improvements

  • Refactor address locations, make composite decoding backwards-compatible (#460)

v0.9.3

19 Nov 17:27
Compare
Choose a tag to compare

⭐ Features

  • Wrap errors to provide additional information (#451)

v0.11.1

09 Nov 18:18
Compare
Choose a tag to compare

🐞 Bug Fixes

  • Don't use the cache when deploying or updating account code (#447)

v0.10.1

06 Nov 18:14
Compare
Choose a tag to compare

🐞 Bug Fixes

  • Don't use the cache when deploying or updating account code (#447)

v0.11.0

13 Oct 23:10
Compare
Choose a tag to compare

πŸ’₯ Breaking Changes

Typed Paths (#403)

Paths are now typed. Paths in the storage domain have type StoragePath, in the private domain PrivatePath, and in the public domain PublicPath. PrivatePath and PublicPath are subtypes of CapabilityPath. Both StoragePath and CapabilityPath are subtypes of Path.

Path
CapabilityPath StoragePath
PrivatePath PublicPath

Storage API (#403)

With paths being typed, it was possible to make the Storage API type-safer and easier to use: It is now statically checked if the correct type of path is given to a function, instead of at run-time, and therefore capability return types can now be non-optional.

The changes are as follows:

For PublicAccount:

  • old: fun getCapability<T>(_ path: Path): Capability<T>?

    new: fun getCapability<T>(_ path: PublicPath): Capability<T>

  • old: fun getLinkTarget(_ path: Path): Path?

    new: fun getLinkTarget(_ path: CapabilityPath): Path?

For AuthAccount:

  • old: fun save<T>(_ value: T, to: Path)

    new: fun save<T>(_ value: T, to: StoragePath)

  • old: fun load<T>(from: Path): T?

    new: fun load<T>(from: StoragePath): T?

  • old: fun copy<T: AnyStruct>(from: Path): T?

    new: fun copy<T: AnyStruct>(from: StoragePath): T?

  • old: fun borrow<T: &Any>(from: Path): T?

    new: fun borrow<T: &Any>(from: StoragePath): T?

  • old: fun link<T: &Any>(_ newCapabilityPath: Path, target: Path): Capability<T>?

    new: fun link<T: &Any>(_ newCapabilityPath: CapabilityPath, target: Path): Capability<T>?

  • old: fun getCapability<T>(_ path: Path): Capability<T>?

    new: fun getCapability<T>(_ path: CapabilityPath): Capability<T>

  • old: fun getLinkTarget(_ path: Path): Path?

    new: fun getLinkTarget(_ path: CapabilityPath): Path?

  • old: fun unlink(_ path: Path)

    new: fun unlink(_ path: CapabilityPath)

⭐ Features

  • Add a hash function to the crypto contract (#379)

  • Added npm packages for components of Cadence. This eases the development of developer tools for Cadence:

    • cadence-language-server: The Cadence Language Server
    • monaco-languageclient-cadence: Language Server Protocol client for the the Monaco editor
    • cadence-parser: The Cadence parser

    In addition, there are also examples for the language server and the parser that demonstrate the use of the packages.

  • Add a command to the language server that allows getting the entry point (transaction or script) parameters (#406)

πŸ›  Improvements

  • Allow references to be returned from from scripts (#400)
  • Panic with a dedicated error for out of bounds array index (#396)

πŸ“– Documentation

  • Document resource identifiers (#394)
  • Document iteration over dictionary entries (#399)

πŸ“¦ Dependencies

v0.9.2

06 Oct 16:33
Compare
Choose a tag to compare

πŸ› οΈ Improvements

  • Panic with a dedicated error for array out of bounds access (#396)