Skip to content

Releases: twitter/util

Util 19.3.0

13 Mar 21:14
Compare
Choose a tag to compare

New Features

  • util-core: Discard parent reader from Reader.flatten
    when child reader encounters an exception. 0cc640ac
  • util-core: Added c.t.conversions.StringOps\#toSnakeCase,toCamelCase,toPascalCase
    implementations. b0a5d062

Util 19.2.0

21 Feb 23:17
Compare
Choose a tag to compare

New Features

  • util-core: updated Reader#fromFuture to resolve its onClose when reading of end-of-stream.
    f2a05474
  • util-core: Added Reader.flatten to flatten a Reader[Reader[_]] to Reader[_],
    and Reader.fromSeq to create a new Reader from a Seq. a49bab4d
  • util-core: Added Duration.fromMinutes to return a Duration from a given number of minutes.
    eda0b390
  • util-core: If given a Timer upon construction, c.t.io.Pipe will respect the close
    deadline and wait the given amount of time for any pending writes to be read. 0a142872
  • util-core: Optimized ConstFuture.proxyTo which brings the performance of
    flatMap and transform of a ConstFuture in line with map. de4cebda
  • util-core: Experimental toggle (com.twitter.util.BypassScheduler) for speeding up
    ConstFuture.map (transformTry). The mechanism, when turned on, runs map operations
    immediately (why not when we have a concrete value), instead of via the Scheduler, where it may
    be queued and potentially reordered, e.g.:
    f.flatMap { _ => println(1); g.map { _ => println(2) }; println(3) } will print 1 2 3,
    where it would have printed 1 3 2. aeafba1a
  • util-security: Pkcs8KeyManagerFactory now supports a certificates file which contains multiple
    certificates that are part of the same certificate chain. 337e270f

Bug Fixes

  • util-core: Fixed the behavior in c.t.io.Reader where Reader#flatMap fails to propagate
    parent reader's onClose. f2a05474

Runtime Behavior Changes

  • util-core: Closing a c.t.io.Pipe will notify onClose when the deadline has passed whereas
    before the pipe would wait indefinitely for a read before transitioning to the Closed state.
    0a142872
  • util-core: Don't allow AsyncSemaphore Permits to be released multiple times. Before it was
    possible to release a permit more than once and incorrectly remove waiters from the queue.
    With this change, the release permit operation is idempotent. ea24c951

Breaking API Changes

  • util-core: Remove c.t.u.CountDownLatch which is an extremely thin shim around
    j.u.c.CountDownLatch that provides pretty limited value. To migrate to j.u.c.CountDownLatch,
    instead of c.t.u.CountDownLatch#await(Duration), please use
    j.u.c.CountDownLatch#await(int, TimeUnit), and instead of
    c.t.u.CountDownLatch#within(Duration), please throw an exception yourself after awaiting.
    b9914f15
  • util-core: Deprecated conversions in c.t.conversions have new implementations
    that follow a naming scheme of SomethingOps. df397f53
    • percent is now PercentOps
    • storage is now StorageUnitOps
    • string is now StringOps
    • thread is now ThreadOps
    • time is now DurationOps
    • u64 is now U64Ops
  • util-collection: Delete util-collection. We deleted GenerationalQueue, MapToSetAdapter, and
    ImmutableLRU, because we found that they were of little utility. We deleted LruMap because it
    was a very thin shim around a j.u.LinkedHashMap, where you override removeEldestEntry. If you
    need SynchronizedLruMap, you can wrap your LinkedHashMap with
    j.u.Collection.synchronizedMap. We moved RecordSchema into finagle-base-http because it was
    basically only used for HTTP messages, so its new package name is c.t.f.http.collection.
    60eff0a4
  • util-core: Rename BlacklistStatsReceiver to DenylistStatsReceiver. ed3f7069
  • util-core: Buf.Composite is now private. Program against more generic, Buf interface instead.
    41e24395

Util 19.1.0

10 Jan 20:57
Compare
Choose a tag to compare

New Features

  • util-core: Added Reader.map/flatMap to transform Reader[A] to Reader[B]. Added fromFuture()
    and value() in the Reader object to construct a new Reader. ac15ad8b

Breaking API Changes

  • util-core: The implicit conversions classes in c.t.conversions.SomethingOps have been
    renamed to have unique names. This allows them to be used together with wildcard imports.
    See Github issue (#239). 2d5d6da9
  • util-core: Both c.t.io.Writer.FailingWriter and c.t.io.Writer.fail were removed. Build your
    own instance should you need to. 63815225

Util 18.12.0

12 Dec 01:02
Compare
Choose a tag to compare

18.12.0

New Features

  • util-core: Provide a way to listen for stream termination to c.t.util.Reader, Reader#onClose
    which is satisfied when the stream is discarded or read until the end. 3b1434e2
  • util-core: Conversions in c.t.conversions have new implementations
    that follow a naming scheme of SomethingOps. Where possible the implementations
    are AnyVal based avoiding allocations for the common usage pattern.
    ee56e5f2
    • percent is now PercentOps
    • storage is now StorageUnitOps
    • string is now StringOps
    • thread is now ThreadOps
    • time is now DurationOps
    • u64 is now U64Ops

Bug Fixes

  • util-core: Fixed a bug where tail would sometimes return Some empty AsyncStream instead of None.
    1dc614bc

Deprecations

  • util-core: Conversions in c.t.conversions have been deprecated in favor of SomethingOps
    versions. Where possible the implementations are AnyVal based and use implicit classes
    instead of implicit conversions. ee56e5f2
    • percent is now PercentOps
    • storage is now StorageUnitOps
    • string is now StringOps
    • thread is now ThreadOps
    • time is now DurationOps
    • u64 is now U64Ops

Breaking API Changes

  • util-core: Experimental c.t.io.exp.MinThroughput utilities were removed. d9c5e4a3
  • util-core: Deleted c.t.io.Reader.Null, which was incompatible with Reader#onClose semantics.
    c.t.io.Reader#empty[Nothing] is a drop-in replacement. 3b1434e2
  • util-core: Removed c.t.util.U64 bits. Use c.t.converters.u64._ instead. 8034e557

Util 18.11.0

12 Nov 23:57
Compare
Choose a tag to compare

Breaking API Changes

  • util-core: c.t.u.Future.raiseWithin methods now take the timeout exception as a call-by-name
    parameter instead of a strict exception. While Scala programs should compile as usual, Java
    users will need to use a scala.Function0 as the second parameter. The helper
    c.t.u.Function.func0 can be helpful. 9bde57ca
  • util-core: Rename c.t.io.Reader.ReaderDiscarded to c.t.io.ReaderDiscardedException.
    a970c5b5

Runtime Behavior Changes

  • util-core: Made Stopwatch.timeNanos monotone. 8d35b496

Util 18.10.0

19 Oct 20:18
Compare
Choose a tag to compare

Breaking API Changes

  • util-core: c.t.io.Reader.Writable and c.t.Reader.writable() are removed. Use c.t.io.Pipe
    instead. 5ef6a0dc

  • util-core: c.t.util.TempFolder has been moved to c.t.io.TempFolder. 2f8ee904

  • util-core: Removed the forwarding types c.t.util.TimeConversions and
    c.t.util.StorageUnitConversions. Use c.t.conversions.time and
    c.t.conversions.storage directly. 0c83ebc0

  • util-core: c.t.concurrent.AsyncStream.fromReader has been moved to
    c.t.io.Reader.toAsyncStream. 6c3be47d

New Features

  • util-core: c.t.io.Reader.fromBuf (BufReader), c.t.io.Reader.fromFile,
    c.t.io.Reader.fromInputStream (InputStreamReader) now take an additional parameter,
    chunkSize, the upper bound of the number of bytes that a given reader emits at each read.
    719f41a6

Runtime Behavior Changes

  • util-core: c.t.u.Duration.inTimeUnit can now return
    j.u.c.TimeUnit.MINUTES. 0daac8d7

Util 18.9.1

26 Sep 23:53
Compare
Choose a tag to compare

Breaking API Changes

  • util-core: c.t.io.Writer now extends c.t.util.Closable. c.t.io.Writer.ClosableWriter
    is no longer exist. 9cc7025c

Bug Fixes

  • util-slf4j-api: Moved slf4j-simple dependency to be a 'test' dependency, instead of a
    compile dependency, which was inaccurate. 3d6d7457

Util 18.9.0

12 Sep 00:06
Compare
Choose a tag to compare

18.9.0

New Features

  • util-logging: New way to construct ScribeHandler for java interoperability.
    845620b4
  • util-core: Added Reader#fromAsyncStream for consuming an AsyncStream as a Reader.
    39ec9849
  • util-core: Introducing Reader.chunked that chunks the output of a given reader.
    1a7c54f9
  • util-core: Added Reader#framed for consuming data framed by a user supplied function.
    2316aa5d
  • util-security: Add NullSslSession related objects for use with non-existent
    SSLSessions. 12de479f

Breaking API Changes

  • util-core: c.t.io.Reader and c.t.io.Writer are now abstracted over the type
    they produce/consume (Reader[A] and Writer[A]) and are no longer fixed to Buf.
    7718fa29

  • util-core: InMemoryStatsReceiver now eagerly creates the mappings for Counters
    and Stats instead of waiting for the first call to Counter.incr and Stat.add.
    97f0f0fa

  • util-core: c.t.io.Reader.Writable is now c.t.io.Pipe. Both Writable type and
    its factory method are deprecated; use new Pipe[A] instead. cbff9760

  • util-slf4j-api: Ensure that marker information is used when determining if log
    level is enabled for methods which support markers. 02d80820

  • util-slfj4-api: Finalize the underlying logger def in the Logging trait as it is not
    expected that this be overridable. If users wish to change how the underlying logger is
    constructed they should simply use the Logger and its methods directly rather than
    configuring the the underlying logger of the Logging trait.

    Add better Java compatibility for constructing a Logger. 56569b9f

Util 18.8.0

07 Aug 00:27
Compare
Choose a tag to compare

18.8.0 2018-08-06

Bug Fixes:

  • util-core: Fixed an issue with Future.joinWith where it waits for
    completion of both futures even if one has failed. This also affects
    the join method, which is implemented in terms of joinWith. 9b598f3f

Util 18.7.0

11 Jul 17:07
Compare
Choose a tag to compare

API Changes

  • util-core: Local.Context used to be a type alias for Array[Option[_]], now it is
    a new key-value liked structure. faaf0f2f