| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
2.12 ready
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
this extracts certain parts of cbt into stand-alone libraries, which can
be published to maven and used outside of cbt.
This also adds scalariform for these parts of the code.
This slows down cbt’s own build a lot because of the number of projects
involved! So we’ll follow this by a bunch of performance tweak commits.
|
|
|
|
|
|
|
| |
Let’s keep move them back into stage2 again instead for reduction
of complexity, cbt build speed and convenience of fewer manual
dependencies.
And for that let cbt just include eval from the start.
|
| |
|
|
|
|
|
|
|
| |
turn replaceSections into helper function instead of trait method
proguard scalafmt build currently suffers from non-deterministic
formatting. Try a few times to reproduce commited Proguard.scala
|
| |
|
|
|
|
| |
also make logic to maintain auto-generated sections re-usable
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
by replacing context.projectDirectory by workingDirectory and using
it as the default but allowing it to being overridden
|
|
|
|
|
|
| |
using lastModified instead of a non-idempotent needsUpdate flag
this fixes a bug where dependees would not be rebuilt if cbt exited
or was killed after dependencies were already rebuilt.
|
|
|
|
|
| |
The exact precedence rule of override code vs original code may still
need to be tweaked as we go along.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
only see itself, but it often needs to see things in the classloaders of
user code, so now we can provie the classloader.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem
I notice that the former release 6.36.0 reset the reporter after
check(), which is not enough. In my use case, I would like to use
apply with resetState=false (or simply inPlace), without checking
it before (check method requires compiling every time, but apply
method has cache).
Under such circumstance, if I offer a piece of code with syntax
error, it will throw CompilerException every time even if I
correct it. It’s because the reporter hasn’t been reset.
Solution
Simply add resetReporter before compile will solve the problem.
Signed-off-by: Christopher Coco <ccoco@twitter.com>
RB_ID=871408
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem
When you want to use the util-eval for validating the correctness of a small
chunk of code, you have to reset whole state between invocations (flag
resetState=true), which is expensive when you already have a bunch of compiled
and loaded classes. Without this, if one check fails, all subsequent checks
will fail as well, since some errors has been reported previously.
Solution
Scala compiler API allows for resetting just the reporter, so that compiled and
loaded classes can remain for re-usage for next checks.
Result
Public API remains the same, however the internal API has one new synchronized
method resetReporter() which does what is explained in the "Solution" section.
Signed-off-by: Ryan O'Neill <ryano@twitter.com>
RB_ID=859878
|
|
|
|
|
|
|
|
|
|
| |
Allows the compiled code to be executed remotely, e.g. using Apache Spark.
Another option would be to make `wrapCodeInClass` (and `codeWrapperLineOffset`) `protected` instead of `private[this]`.
Signed-off-by: Ruben Oanta <roanta@twitter.com>
RB_ID=844794
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem
We've been nagging each other about == vs ===.
Solution
ag -l ' === ' \
./util \
./ostrich \
./finagle \
./twitter-server \
./scrooge \
./twitter-server-internal | \
grep '\.scala' | \
xargs sed -i '' 's/ === / == /'
ag -l ' ===' \
./util \
./ostrich \
./finagle \
./twitter-server \
./scrooge \
./twitter-server-internal | \
grep '\.scala' | \
xargs sed -i '' 's/ ===$/ ==/'
Result
No more === nags in RB
RB_ID=766849
|
|
|
|
|
|
|
| |
There are a lot of warnings when compiling util,
this fixes many of them.
RB_ID=739494
|
|
|
|
|
|
| |
Signed-off-by: Moses Nakamura <mnakamura@twitter.com>
RB_ID=572344
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem
We want to publish 2.11 releases of Finagle subprojects that depend on Ostrich,
which we have not previously built for 2.11 (because it has specs tests, and
because it depends on scala-json and util-eval, neither of which previously
worked on 2.11).
Solution
util-eval previously didn't work on 2.11 because `scala.ScalaObject` has been
removed since 2.10. This is fixed here. The bulk of this commit is Rodrigo
Lazoti's migration of Ostrich's tests from specs to ScalaTest (I'm not using his
pull request since the PR also replaces scala-json with Jackson, which we don't
want to do at this time to avoid breaking public APIs). This commit also
reinstates util-eval and the Finagle subprojects that depend on Ostrich in their
projects' cross-builds.
Result
util-eval, ostrich, finagle-ostrich4, finagle-example, and finagle-stress all
build and pass tests on 2.11 (from SBT) for the first time.
RB_ID=534127
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem
specs is deprecated and throws a fair number of NullPointerExceptions in scala 2.10
Also all of our tests are disabled in scala 2.10 for sbt
Solution
Port all our tests to scalatest
This is based off of this PR: https://github.com/twitter/util/pull/97
Result
Tests pass
RB_ID=397681
|
|
|
|
|
|
| |
Signed-off-by: Evan Meagher <evm@twitter.com>
RB_ID=290353
|
|
|
|
|
|
|
|
| |
2.10 compiler is much more strict about pattern matching exceptions and
warns if catch all case is not qualified with `Throwable`. So let's do
that to decrease compiler warnings.
RB_ID=237379
|
|
|
|
|
| |
RB_ID=152166
TBR=true
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix for when scala.tool.nsc.Interpreter and scala.ScalaObject class
files are on the classpath directly instead of in jar. fix for when
multiple class loaders are used. i needed both these fixes to use
Eval with 'hadoop jar' and a fat jar since hadoop unpacks the jar
to a temporary directory and puts the class files directly on the
classpath by introducing a new class loader
Signed-off-by: Rao Fu <rao@twitter.com>
RB_ID=142194
|
|
|
|
|
| |
Github-pull-request: https://github.com/twitter/util/pull/24
Signed-off-by: marius a. eriksen <marius@twitter.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The Scala compiler propagates warnings through exceptions. So Eval
failed if an Eval'ed file uses something deprecated. Disable
warnings.
RB_ID=63167
|
| |
|