shard-radix/CHANGELOG.md
Luis Lavena 9003075ec7 Introduce types for forward compiler compatiblity
After Crystal 0.15, compiler will require declare the types used
by instance variables on classes.

This require changes to the usage of `Radix::Tree` by introducing
the type of payload elements it will handle:

    # Will only support symbols as payload
    tree = Radix::Tree(Symbol).new
    tree.add "/", :root

    # Error: cannot add node with anything other than Symbol
    tree.add "/meaning-of-life", 42

The changes ensure future compatibility with Crystal and also
enforces a more declarative usage of `Radix::Tree`.

If necessary, you can combine multiple types to ensure a tree
can contain all the wide range of payloads you need:

    tree = Radix::Tree.new(Foo | Bar | Symbol).new
    tree.add "/", :root
    tree.add "/foo", foo_instance

This change includes:

- Tree, Node and Result has been updated to require types.
- Node is capable of have optional payload (from defined type).
- Documentation has been updated to reflect this change.
2016-04-16 16:53:20 -03:00

1.6 KiB

Change Log

All notable changes to Radix project will be documented in this file. This project aims to comply with Semantic Versioning, so please check Changed and Removed notes before upgrading.

Unreleased

Fixed

  • Improve forward compatibility with newer versions of the compiler by adding missing types to solve type inference errors.

Changed

  • Radix::Tree now requires the usage of a type which will be used as node's payload. See README for details.

0.2.1 - 2016-03-15

Fixed

  • Correct Result#key incorrect inferred type.

Removed

  • Attempt to use two named parameters at the same level will raise Radix::Tree::SharedKeyError

0.2.0 - 2016-03-15 [YANKED]

Removed

  • Attempt to use two named parameters at the same level will raise Radix::Tree::SharedKeyError

0.1.2 - 2016-03-10

Fixed

  • No longer split named parameters that share same level (@alsm)

Changed

  • Attempt to use two named parameters at same level will display a deprecation warning. Future versions will raise Radix::Tree::SharedKeyError

0.1.1 - 2016-02-29

Fixed

  • Fix named parameter key names extraction.

[0.1.0] - 2016-01-24

Added

  • Initial release based on code extracted from Beryl.