Releases: allenai/common
Releases · allenai/common
1.4.10
v1.4.9
v1.4.8
v1.4.7
v1.4.5
v1.4.2
Update ElasticSearch
This release updates ElasticSearch from 1.7.1 to 2.3.3.
v1.4.0
This release includes some changes to the common indexer, as well as some changes to org.allenai.common.Enum
.
Migrating from 1.3.0
There are two ways to migrate: Serialization-compatible (where the JSON generated is identical), and serialization-non-compatible (where the JSON serialized changes, but you have to make fewer changes).
v1.3.0 code:
sealed abstract class MyEnum(id: String) extends Enum[MyEnum](id)
object MyEnum extends EnumCompanion[MyEnum] {
case object One extends MyEnum("one")
case object Two extends MyEnum("two")
register(One, Two)
}
If you wish to be fully backwards-compatible (with One
serializing as the JSON string "one"
), you should update your code to the following:
// Note the `override val` before `id`.
sealed abstract class MyEnum(override val id: String) extends Enum[MyEnum]
object MyEnum extends EnumCompanion[MyEnum] {
// Creation / registration code remains identical.
case object One extends MyEnum("one")
case object Two extends MyEnum("two")
register(One, Two)
}
If you're OK with your enums serializing with new text matching the case object names (One
serializing as the JSON string "One"
), you should update your code to the following:
// No constructor parameters.
sealed abstract class MyEnum extends Enum[MyEnum]
object MyEnum extends EnumCompanion[MyEnum] {
case object One extends MyEnum
case object Two extends MyEnum
register(One, Two)
}
v1.3.0
v1.2.2 Add spray-client helpers
- Add a new object
SprayClientHelpers
to thewebapp
subproject, containing utilities for building and sending HTTP requests through spray