Skip to content

Metal 8.0.0

Compare
Choose a tag to compare
@jvdb jvdb released this 05 Aug 09:21
· 253 commits to master since this release
390d8eb

This release adds two major enhancements:

  1. The Scope ValueExpression allows referencing values inside a dynamically constructed scope, useful for referencing values inside a specific part of the structure. This is especially useful for data structures that have many repeating structures: Scope makes it much easier to reference the current, local version of a value.
  2. The CurrentIteration ValueExpression allows referencing the count of a running iteration (e.g., when inside an iterating Token such as Rep, RepN or While). Passing a value allows referencing multiple levels of iteration (0=current, 1=parent, 2=parent-of-parent, etc.)

Additionally, the code has been cleaned up and improved in many ways. Most significantly:

  1. Instead of returning ImmutableList<Optional<Value>> from evaluating a ValueExpression, this now returns an ImmutableList<Value>. To signify the absence of a value, there is now a NOT_A_VALUE constant, that replaces empty() instances inside the list of results.
  2. There are ValueExpression implementations that always return a single value (e.g., Last or any of the Fold*). To enhance the typing of these ValueExpressions, there is now a SingleValueExpression that derives from ValueExpression and provides an evalSingle(...) method that directly returns an Optional<Value>.

Apart from these changes, many small fixes have been performed based on applying many new build and analysis tools on our code base, including CI on Windows.

Note: From Metal 9.x.x onward, the required version of Java will change from at least 8 to at least 11 (or higher, depending on when it will be released).

For a more detailed description, please see the 8.0.0 Milestone.