Skip to content

Releases: twitter/util

Util 19.11.0

06 Nov 16:17
Compare
Choose a tag to compare

New Features

  • util: Add initial support for JDK 11 compatibility. e6970ed1

  • util-core: Created public method Closable.stopCollectClosablesThread that stops CollectClosables
    thread. a8260998

  • util-core: Introduced Reader.fromIterator to create a Reader from an iterator. It is not
    recommended to call iterator.next() after creating a Reader from it. Doing so will affect the
    behavior of Reader.read() because it will skip the value returned from iterator.next.
    d1b42f4b

Runtime Behavior Changes

  • util: Upgrade to caffeine 2.8.0 f35ae591

Breaking API Changes

  • util-core: Add c.t.io.BufReader.readAll to consume a Reader[Buf] and concat values to a Buf.
    Replace c.t.io.Reader.readAll with Reader.readAllItems, the new API consumes a generic Reader[T],
    and return a Seq of items. a47a219b
  • util-core: Moved c.t.io.Reader.chunked to c.t.io.BufReader.chunked, and Reader.framed to
    BufReader.framed. 459038f9
  • util-core: Moved c.t.io.Reader.copy to c.t.io.Pipe.copy, and Reader.copyMany to
    Pipe.copyMany. 5562ebf3

Deprecations

  • util-core: Mark c.t.io.BufReaders, c.t.io.Bufs, c.t.io.Readers, and c.t.io.Writers as
    Deprecated. These classes will no longer be needed, and will be removed, after 2.11 support is
    dropped. 844fe24d
  • util-stats: Removed deprecated methods stat0 and counter0 from StatsReceiver. 5119e65c

Util 19.10.0

09 Oct 22:22
Compare
Choose a tag to compare

Runtime Behavior Changes

  • util-core: When a computation from FuturePool is interrupted, its promise is
    set to the interrupt, wrapped in a j.u.c.CancellationException. This wrapper
    was introduced because, all interrupts were once CancellationExceptions. In
    RB_ID=98612, this changed to allow the user to raise specific exceptions as
    interrupts, and in the aid of compatibility, we wrapped this raised exception
    in a CancellationException. This change removes the wrapper and fails the
    promise directly with the raised exception. This will affect users that
    explicitly handle CancellationException. d95914f8

Bug Fixes

  • util-core: Fixed bug in c.t.io.Reader.framed where if the framer didn't emit a List the
    emitted frames were skipped. aedc943e
  • util-hashing: Fix a bug where partitionIdForHash was returning incosistent values w.r.t
    entryForHash in KetamaDistributor. c66080b6

Util 19.9.0

10 Sep 23:41
Compare
Choose a tag to compare

Runtime Behavior Changes

  • util-app: Better handling of exceptions when awaiting on the c.t.app.App to close at
    the end of the main function. We Await.ready on this as the last step of
    App#nonExitingMain which can potentially throw a TimeoutException which was previously
    unhandled. We have updated the logic to ensure that TimeoutExceptions are handled accordingly.
    b17297c7
  • util: Upgrade to Scala Collections Compat 2.1.2. d4117162

Breaking API Changes

  • util-core: BoundedStack is unused and really old code. Delete it. eeb0e947
  • util-logging: com.twitter.logging.ScribeHandler and com.twitter.logging.ScribeHandlers have
    been removed. Users are encouraged to use slf4j for logging. However, if a util-logging integrated
    ScribeHandler is still required, users can either build their own Finagle-based scribe client as
    in ScribeRawZipkinTracer in finagle-zipkin-scribe, or copy the old ScribeHandler
    implementation directly into their code. f4e56599

Util 19.8.1

15 Aug 20:46
Compare
Choose a tag to compare

New Features

  • util: Enables cross-build for 2.13.0. d5d20cc3

Java Compatibility

  • util-stats: In c.t.finagle.stats.AbstractStatsReceiver, the counter, stat and
    addGauge become final, override counterImpl, statImpl and addGaugeImpl instead.
    d5d20cc3

  • util-core:
    c.t.concurrent.Offer.choose,
    c.t.concurrent.AsyncStream.apply,
    c.t.util.Await.all,
    c.t.util.Closable.sequence become available to java for passing varargs. d5d20cc3

  • util-stats:
    c.t.finagle.stats.StatsReceiver.provideGauge and addGauge become available to java for
    passing varags. d5d20cc3

Breaking API Changes

  • util-core: (not breaking) c.t.util.Future.join and c.t.util.Future.collect now take
    Iterable[Future[A]] other than Seq.d5d20cc3

  • util-core: Revert the change above, in c.t.util.Future, collect, collectToTry and join
    take scala.collection.Seq[Future[A]]. e451e3b2

  • util-core: com.twitter.util.Event#build now builds a Seq of events. Event#buildAny builds
    against any collection of events. d5d20cc3

Util 19.8.0

06 Aug 07:18
Compare
Choose a tag to compare

Breaking API Changes

  • util-logging: The namespace forwarders for Level and Policy in com.twitter.logging.config
    have been removed. Code should be updated to use com.twitter.logging.Level and
    com.twitter.logging.Policy where necessary. Users are encouraged to use 'util-slf4j-api' though
    where possible. 6ab4aeac
  • util-logging: The deprecated com.twitter.logging.config.LoggerConfig and associated
    classes have been removed. These have been deprecated since 2012. Code should be updated
    to use com.twitter.logging.LoggerFactory where necessary. Users are encouraged to use
    'util-slf4j-api' though where possible. 5d43773e

Runtime Behavior Changes

  • util: Upgrade to Jackson 2.9.9. 0f0bcd44

Util 19.7.0

18 Jul 13:56
Compare
Choose a tag to compare

Breaking API Changes

  • util-core: Removed deprecated c.t.concurrent.Scheduler methods usrTime,
    cpuTime, and wallTime. These were deprecated in 2015 and have no
    replacement. 0d77572

  • util-core: Removed deprecated com.twitter.logging.config classes SyslogFormatterConfig,
    ThrottledHandlerConfig, SyslogHandlerConfig. These were deprecated in 2012 and have
    no replacement. Users are encouraged to use 'util-slf4j-api' where possible. 28d9de5

Util 19.6.0

19 Jun 21:10
Compare
Choose a tag to compare

Bug Fixes

  • util-core: Fixed the behavior in c.t.io.Reader where reading from Reader\#empty fails to return
    a ReaderDiscardedException after it's discarded. 6ac4c601

Runtime Behavior Changes

  • util-core: Use Local at callback creation for Future's interrupt handler rather than
    raiser's locals so that it is consistent with other callbacks. This functionality is
    currently disabled and can be enabled by a toggle (com.twitter.util.UseLocalInInterruptible)
    by setting it to 1.0 if you would like to try it out. 04cee8fb

Util 19.5.1

21 May 18:17
Compare
Choose a tag to compare

No Changes

Util 19.5.0

17 May 21:54
Compare
Choose a tag to compare

New Features

  • util-app: Track the registration of duplicated Flag names. Currently, we print a warning to
    stderr but do not track the duplicated Flag names. Tracking them allows us to inspect and
    warn over the entire set. 4875552e

Util 19.4.0

18 Apr 22:23
Compare
Choose a tag to compare

19.4.0

New Features

  • util-app: Improve usage of Flag.let by providing a Flag.letParse method
    0d9dded3