github onflow/cadence v0.8.0

This release focuses on improvements, bug fixes, and bringing the documentation up-to-date.

🛠 Improvements

  • Improved support on Windows: Treat carriage returns as space (#304)

  • Improved JSON marshalling for more AST elements (#292, #286)

  • Recursively check if assignment target expression is valid, don't copy returned values (#288)

  • Consider existing prefix when suggesting completion items (#285)

  • Include available declarations in "not declared" error (#280)

  • Enforce the requirement for types to be storable in more places:

    • Transaction/script parameter types (#305)
    • Script return type (#291)
    • Arguments passed to the account load and store functions (#251)

    Previously, using non-storable failed at run-time, now the programs are rejected statically.

⭐ Features

  • Add a version constant (#289)
  • Language Server: Include error notes as related information in diagnostic (#276)

🐞 Bug Fixes

  • Don't return an error when a location type is not supported (#290)
  • Handle incomplete types in checker (#284)
  • Fix the suggestion in the error when an interface is used as a type (#281)

📖 Documentation

  • Brought the documentation up-to-date, include all new language features and API changes (#275, #277, #279)

💥 Breaking Changes

  • Arguments passed to cadence.Value#WithType are now typed as pointers (*cadence.Type) rather than values (cadence.Type)

    Example:

    myEventType := cadence.EventType{...})
    
    // this 👇 
    myEvent := cadence.NewEvent(...).WithType(myEventType)
    
    // changes to this 👇 
    myEvent := cadence.NewEvent(...).WithType(&myEventType)

Don't miss a new cadence release

NewReleases is sending notifications on new releases.