Skip to content

Cicero v0.20.0

Compare
Choose a tag to compare
@jeromesimeon jeromesimeon released this 01 Nov 01:40

Butterfly Release πŸ¦‹

This release is a full redesign of the Accord Project template technology:

The contract was signed on {{contractDate as "DD/MM/YYYY"}}.
  • A notion of template blocks
    • Handles structured data such as lists, conditional sections or complex objects
  • A new notion of dynamic templates
    • Allows users to create text dynamically through embedded Ergo expressions

It also includes several new Ergo features and numerous bug fixes.

Note: This release requires changes to application and template code. See the migration guide for more information.

πŸš€ New Features

  • #405: Support for markdown with rich text annotations (@jeromesimeon)
  • #392: Fully redesigned and more expressive template syntax (@jeromesimeon)
  • #346: Ability to embed Ergo expressions within your templates (@jeromesimeon)
  • #435: Templates have a new directory structure, aligning better with the Accord Project conceptual model (@jeromesimeon)
  • #20: Support for lists of terms

πŸ›° New Command Line

#425: A new and improved command line for Cicero which better aligns with the rest of the Accord Project (@jeromesimeon)

cicero <cmd> [args]

Commands:
  cicero parse       parse a contract text
  cicero draft       create contract text from data
  cicero normalize   normalize markdown (parse & redraft)
  cicero trigger     send a request to the contract
  cicero invoke      invoke a clause of the contract
  cicero initialize  initialize a clause
  cicero archive     create a template archive
  cicero compile     generate code for a target platform
  cicero get         save local copies of external dependencies

Options:
  --version      Show version number                                   [boolean]
  --verbose, -v                                                 [default: false]
  --help         Show help                                             [boolean]

πŸ¦‹ Ergo

  • #392: New syntax for constructing strings with embedded expressions`This is text with {{% expression %}} and more text` (@jeromesimeon)
  • #3: Support for enumerated values, with proper typing and pattern matching (@jeromesimeon)
  • #143: New set state.NAME = EXPR; statement for modifying a specific variable in the contract state (@jeromesimeon)
  • #303: Redefining a constant is now a compiler warning (@jeromesimeon)

πŸ¦‹ Ergo Standard Library

  • New functions for URI encoding (encode and decode)
  • New format function for DateTime
  • New getOptions function which returns global static options for the compiler

πŸ› Bug Fixes

  • #441, #353: Fixes to template parsing in the presence of special characters (e.g., \t) (@jeromesimeon)
  • #407: Template variables starting with as do not result in parse errors anymore (@jeromesimeon)
  • #406: Fixes a regression when using DateTime within template variables of a complex type (@jeromesimeon)
  • #390: Now text generation properly handled nested clauses (@jeromesimeon)
  • #375: Badly specified dates now produce an error rather than a warning (@jeromesimeon)
  • #467: Tests now use current timezone for dates in contract text
  • #642: now is no longer a magic variable (@jeromesimeon)
  • #575: toString now properly format numeric values based on their types (@jeromesimeon)
  • #465: Constants are now properly imported and scoped, and can be accessed using an explicit namespace (@jeromesimeon)
  • #644: Cicero compilation target properly includes type hierarchy (@jeromesimeon)
  • #645: Type soundness of match expression (@jeromesimeon)