Skip to content

sift-0.9.0

Compare
Choose a tag to compare
@junkdog junkdog released this 22 Apr 13:57
· 177 commits to main since this release

sift-0.9.0 2023-04-22

Entity Registration with Generic Types

Entities can now be registered against generic type signatures, such as Repository<User>. This first iteration
does not cover all use-cases, specifically type arguments inferred from context are currently not resolved,
leading to sift ignoring the generic signatures of method invocations.

Breaking change: sift.core.dsl.Type supersedes org.objectweb.asm.Type

The sift.core.dsl.Type class supersedes org.objectweb.asm.Type usage in the DSL. The new type
class supports incorporating generic type information and is generally easier to work with. Instances
of the new Type class are created with the type() function or the String.type extension property,
for example: type("java.lang.String") and "java.lang.String".type.

Breaking change: entity property update strategies

Entity properties now overwrite existing properties by default, instead of appending to them . You can
can modify this behavior by specifying the strategy parameter in the property() function. For example:

property(PropertyStrategy.unique, foo, "labels", withValue("hello"))

Property strategies are one of: replace, append, prepend, immutable and unique.

New/Tweaks

  • DSL/Class: added inherited parameter to methods() and fields() to include inherited methods and fields.
  • Enhanced performance primarily focused on element trace optimizations - the process of interrelating
    elements as they are navigated by the DSL. This enhancement reduces the total execution time by up to
    40% for complex templates.
  • DSL/Method: filterName() added string overload for name.
  • DSL/Method: fieldAccess {} to iterate accessed fields.
  • Entity elements of Entity.Type.fieldAccess can now be either fields or classes. If the latter,
    then the type of the field is used.
  • siftrc.zsh|sh is now created under ~/.local/share/sift/. It currently holds SIFT_ARGS, CLI options
    always appended.
  • --stastistics prints statistics about the state from the execution of the system model template.

Breaking changes

  • TODO: methods affected by Type change

Fixes

  • sift template: object Actions were not associated with their DSL methods.