Twitter Util Versions Save

Wonderful reusable code from Twitter

util-22.12.0

1 year ago

22.12.0

New Features

  • util-core: Introduce Future.fromCompletableFuture PHAB_ID=D940686
  • util-core: Introduce Time.fromInstant e9d1bc9e
  • util-core: Introduce TimeFormatter, a replacement for TimeFormat. TimeFormatter uses the modern java.time.format.DateTimeFormatter API instead of the java.text.SimpleDateFormat with the main advantage being that it doesn't require synchronization on either formatting or parsing, and is thus more performant and causes no contention. e9d1bc9e
  • util-stats: MetricBuilder now has API to configure a format in which histograms are exported. Use .withHistogramFormat to access it. PHAB_ID=D908189

Deprecations

  • util-core: TimeFormat, as well as the Time.format methods are deprecated in favor of using TimeFormatter. e9d1bc9e

Runtime Behavior Changes

  • util: Bump version of Jackson to 2.14.1. 1a6ff676
  • util-core: Time.at, Time.toString, and Time.fromRss now use TimeFormatter internally and thus have better performance and do not cause contention through synchronization. toString always uses TimeFormatter while at and fromRss only use it when run with Java 9 or later due to a compatibility bug in Java 1.8. e9d1bc9e

util-22.7.0

1 year ago

22.7.0

  • util: Update snakeyaml to 1.28 d486a7da

Breaking API Changes

  • util-stats: SourceRole subtypes have been moved into the SourceRole object to make their relationship to the parent type more clear. 633cf5b0

Runtime Behavior Changes

  • util-jackson: Update Jackson library to version 2.13.3 8c96a442
  • util-jackson: Deserialized case classes with validation on optional fields shouldn't throw an error. 3b94d2e6

util-22.4.0

2 years ago

22.4.0

Breaking API Changes

  • util-stats: The metric instantiation methods have been removed from MetricBuilder. Use the methods on StatsReceiver to instantiate metrics instead. 3685d725

util-22.3.0

2 years ago

22.3.0

Deprecations

  • util-stats: Deprecated methods on MetricBuilder for directly instantiating metrics so that we can eventually remove the statsReceiever field from MetricBuilder and let it just be the source of truth for defining a metric. a7958355

util-22.2.0

2 years ago

22.2.0

New Features

  • util-core: Added Memoize.classValue as a Scala-friendly API for java.lang.ClassValue. b696fdfd
  • util-jvm: Register JVM expression including memory pool usages (including code cache, compressed class space, eden space, sheap, metaspace, survivor space, and old gen) and open file descriptors count in StatsReceiver. ad617fe9
  • util-slf4j-jul-bridge: Add Slf4jBridge trait which can be mixed into extensions of c.t.app.App in order to attempt installation of the SLF4JBridgeHandler via the Slf4jBridgeUtility in the constructor of the c.t.app.App instance. ab73d64f

Runtime Behavior Changes

  • util-slf4j-api: Update the Logger API to include "call-by-name" method variations akin to the Logging trait. When creating a Logger from a Scala singleton object class, the resultant logger name will no longer include the $ suffix. Remove the deprecated Loggers object which is no longer needed for Java compatibility as users can now directly use the Logger apply functions with no additional ceremony. cd99f165
  • util: Bump version of Caffeine to 2.9.3. 07b5c2ef

Breaking API Changes

  • util-core: The c.t.util.Responder trait has been removed. 88d3c95a

util-22.1.0

2 years ago

22.1.0

Breaking API Changes

  • util-jackson: The error message when failing to deserialize a character now correctly prints the non-character string. 4ddeaf89

Runtime Behavior Changes

  • util: Bump version of Jackson to 2.13.1. 4ddeaf89
  • util-core: Return suppressed exception information in Closable.sequence 2211f75b

util-21.12.0

2 years ago

21.12.0

Breaking API Changes

  • util-core: Activity.collect* and Var.collect* are now implemented in terms of known collection type scala.collection.Seq versus HKT CC[X] before. This allows for certain performance enhancements as well as makes it more aligned with the Future.collect APIs. caf528e2

util-21.11.0

2 years ago

21.11.0

Breaking API Changes

  • util-security: Use snakeyaml to parse yaml instead of a buggy custom yaml parser. This means that thrown IOExceptions have been replaced by YAMLExceptions. Additionally, the parser member has been limited to private visibility. 3643e1e8

New Features

  • util-security: Any valid yaml / json file with string keys and values can be loaded with com.twitter.util.security.Credentials. 3643e1e8

Runtime Behavior Changes

  • util-cache: Update Caffeine cache library to version 2.9.2 c1d62105
  • util-jackson: Enable BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES in ScalaObjectMapper to guard against Remote Code Execution (RCE) security vulnerability. This blocks polymorphic deserialization from unsafe base types. 35f262f2

util-21.10.0

2 years ago

21.10.0

New Features

  • util-core: Add convenience methods to convert to java.time.ZonedDateTime and java.time.OffsetDateTime. toInstant, toZonedDateTime, and toOffsetDateTime also preserve nanosecond resolution. c2750767
  • util-stats: Moved c.t.finagle.stats.LoadedStatsReceiver and c.t.finagle.stats.DefaultStatsReceiver from the finagle-core module to util-stats. 266b69bd

util-21.9.0

2 years ago

New Features

  • util-jvm: Experimentally crossbuilds with Scala 3. bfdde071
  • util-stats: Counter, Gauge, and Stat can be instrumented with descriptions. 4e68dd09
  • util-cache: Experimentally crossbuilds with Scala 3. 22977aa0.
  • util-cache-guava: Experimentally crossbuilds with Scala 3. 6131382e.
  • util-routing: Experimentally crossbuilds with Scala 3. 9615a9f1
  • util-sl4j-api: Experimentally crossbuilds with Scala 3. e2368780
  • util-sl4j-jul-bridge: Experimentally crossbuilds with Scala 3. 16a4a945
  • util-stats: Experimentally crossbuilds with Scala 3. ea54f59c
  • util-zk-test: Experimentally crossbuilds with Scala 3. 86df882b
  • util-app: Flags parsing will now roll-up multiple flag parsing errors into a single error message. When an error is encountered, flag parsing will continue to collect parse error information instead of escaping on the first flag failure. After parsing all flags, if any errors are present, a message containing all of the failed flags and their error reason, along with the help usage message will be emitted. 0def519d

Runtime Behavior Changes

  • util: Bump version of Jackson to 2.11.4. 72b9ba1e
  • util: Bump version of json4s to 3.6.11. a9afb222

Breaking API Changes

  • util-app: the c.t.app.App#flags field is now a final def instead of a val to address override val scenarios where the c.t.app.App#flags are accessed as part of construction, resulting in a NullPointerException due to access ordering issues. The c.t.app.Flags class is now made final. The c.t.app.App#name field has changed from a val and is now a def. A new c.t.app.App#includeGlobalFlags def has been exposed, which defaults to true. The c.t.app#includeGlobalFlags def can be overridden to false (ex: override protected def includeGlobalFlags: Boolean = false) in order to skip discovery of GlobalFlags during flag parsing. b44e820c