[split] One step on the road to get pants publishing in the birdcage is to add provides() clauses to the BUILD files.  This is the result of running a script, that mines the POM files for artifacts to publish.  Maven and pants don't correspond 1:1, however, so this may result in some provides() being put on objects that won't ever publish, and some provides() missing on things that do.  This should serve as a first cut, that we might tweak in subsequent RBs.

Prior art (that wasn't committed): https://reviewboard.twitter.biz/r/415349/

RB_ID=434071
[split] util-core: Improve java friendliness of futures

Problem

Future is not terribly java friendly, and grepping through some
java code, I saw a bunch of Future$.MODULE$ for join and flatten,
for which the scala compiler can't generate forwarders because they
collide with methods on their respective classes.

Solution

Make a Futures object which will be easier to call from java

Result

Java programmers will be freed from the tyranny of Future$.MODULE$

RB_ID=437791
[split] csl: Fix tls-able urls to point to https

RB_ID=437687
TBR=true
[split]  util-core: Reimplement Buf.Utf8 encoder/extractor using io.Charsets

 Problem

 Buf.Utf8 had an ad-hoc implementation of String en/coding separate
 from io.Charsets. The other charsets in io.Charsets were missing
 Buf extractors / encoders.

 Solution

 Implement Buf to String en/decoding for all charsets in
 io.Charsets. Reimplement Buf.Utf8 en/decoder similarly.

 Result

 New publicly visible Buf en/decoders for all charsets in io.Charsets.
 New implementation of Buf.Utf8.

RB_ID=433323
[split] util-core: Make register/close on Event() work atomically

Problem

Event[T]() creates an instance that maintains a list of registered
witnesses in @volatile var registerrs. The updates to this var are neither
atomic nor synchronized. As a result adding/closing a witness is not
guaranteed to execute successfully.

Solution

Wrap every access of the witnesses list with synchronized block.
+Use a Vector instead of a List for efficiency.

This Commit is comming from github.com/sirmax, partially modified by me.
Signed-off-by: Steve Gury <stevegury@twitter.com>

RB_ID=382203
[split] storage parse() should be able to handle Long

RB_ID=438865
[split] Reader.copy test flakiness

Problem

Reader.copy fails intermittently. This is because Future.respond is not
run in sequence, unlike transform which is. This caused the transform
callback to sometimes run before the respond callback, resulting in
"write while writing" exceptions.

Sneak fix: avoid overflow in Buf.slice when i>0 and j=Int.MaxValue.

Solution

Use transform instead of respond.

Result

Effects are properly sequenced.

RB_ID=441049
[split] Birdcage: Upgrade to scala_2.10

RB_ID=443649
TBR=true
NO-QUEUE=true
[split] util-core: Fixed FuturePool for NLRC

Problem

FuturePool doesn't handle NonLocalReturnControl consistently, since
immediatePool respects standard NLRC semantics.  Since immediatePool
is used for testing, if someone used an immediatePool for testing
and found their NonLocalReturn worked, it would be astonishing that
it didn't work elsewhere.

Solution

Change immediatePool to not respect standard scala semantics for
NonLocalReturnControl, and ensure ExecutorServiceFuturePool wraps
NLRC in FNLRC.

Result

Supported FuturePools have consistent behavior.

RB_ID=437529
[split] util-cache: Adds a Guava-backed asynchronous cache

Problem

It's often useful to have an in memory, in process cache of futures.
However, it's a tricky to get right.  This means that the twitter
codebase is littered with slightly incorrect ones.  Even if you fix
one of them, because they're all different, other implementations
won't get the update.

Solution

Combining guava caches and a few simple primitives for caches, we
can make an easily understandable and easily modifiable cache for
futures.

Result

There's a canonical future cache that can be pointed to when people
need it

RB_ID=400407
[split] just merging in master - no conflicts

RB_ID=427589
[split] util-logging: make Logger immutable & break cyclic dependency on Level

Problem

`com.util.logging`s Logger and Level objects had cyclic dependencies
and the `Logger` object had global mutable state that was not safely
published in terms of memory visibility.

Solution

Change the dependency to be a single direction from `Logger` to
`Level` and make `Logger`s maps be immutable.

Result

The objects now live in an immutable, non-cyclic dependency harmony.

RB_ID=446527
[split] bump util to 6.21.2-SNAPSHOT - and bump a bunch of other poms too

Pushing CSL libs back to SNAPSHOT so our release scripts work.  Then we will release :-)

RB_ID=448209
TBR=true
[split] util-jvm: Fix logging in Jvm.foreachGc

Problem

The `java.util.logging.Logger` used in `Jvm.foreachGc` did not
have a nice name.
The logging was done at warning level and yet there is nothing
the end users can do about it.

Solution

Move the `Logger` to the `Jvm` companion object and do the
logging at `Level.FINE`.

Result

Less cluttered logs.

RB_ID=448203
[split] util-core: document StorageUnit can overflow

Problem

Some of `StorageUnit`s methods can cause overflows and this
behavior is not documented.

Solution

Document this behavior at the class level and on `parse`.

RB_ID=448953
[split] util-core: Event.filter only 1 call to filter predicate

Problem

Using `Event.filter` calls the predicate twice.
While this is not incorrect, it is surprising and
unnecessary.

Solution

Change `Event.collect` to use `PartialFunction.runWith`.

Result

The predicate is only called one time by `Event.filter`.

RB_ID=450299
[split] **/BUILD: no pants() or deps(), no duplicate deps

- Get rid of the message:
The alias 'dependencies(..)' has been deprecated in favor of 'target(..)'

- Get rid of (most?) pants() invokations, as suggested by:
*** pants() wrapper is obsolete and will be removed in a future release. See http://pantsbuild.github.io/build_files.html ***

- Remove duplicate dependencies

RB_ID=451205
[split]  csl/runbenchmarks.bash: fixup + drop mvn and bin/caliper dep

 Problem

 csl/runbenchmarks.bash was broken by a recent change to bin/runutil.
 this rb fixes that while dropping the dependency on bin/caliper (and
 transitively bin/runutil) and also the dependency on mvn.

 Solution

 rewrite csl/runbenchmarks.bash using pants' bench goal. try to optimize
 memory usage for the two failing tests (h/t @koliver).

 Result

 benchmark results are recorded but two no longer run due to exceeding their
 heap limit. see http://go/jira/CSL-1104 for details. even with the two
 failing benchmarks this is an improvement over the status quo of total
 brokenness.

RB_ID=450939
[split] birdcage: TWOTEN --> SNAPSHOT

Problem

Not naming our poms TWOTEN confuses a lot of our automated built stuff such as maven-tools and the snapshot CI

Solution

Set the suffix back to SNAPSHOT, as well as bump the patchlevel version to every pom because SNAPSHOT < TWOTEN lexically in pants.

RB_ID=447205
[split] Finagle: clear locals before entering server dispatch loop

Problem

Locals from the caller of Server.serve* (alternatively, ServerBuilder.build)
can set locals that are propagated to the server's dispatch loop. This
is not usually what we want. The server should start with a clean slate.

Solution

Introduce the ability to clear locals. Do so when entering dispatch loops.

RB_ID=450639