aboutsummaryrefslogtreecommitdiff
path: root/libraries/eval
Commit message (Collapse)AuthorAgeFilesLines
* fix recursive and make cbt package jarsChristopher Vogt2017-06-171-1/+3
|
* scalatest plugin now does not need import anymoreChristopher Vogt2017-04-021-5/+0
|
* Get rid of the hacky "essential" plugins separationChristopher Vogt2017-03-191-5/+2
| | | | | | | 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 `test` into a subproject for easy access to test’s tasksChristopher Vogt2017-02-271-3/+3
|
* easier setting of projectDirectory in sub-buildsChristopher Vogt2017-02-131-1/+1
| | | | | by replacing context.projectDirectory by workingDirectory and using it as the default but allowing it to being overridden
* idempotent change propagationChristopher Vogt2017-02-091-1/+1
| | | | | | 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.
* Add support for dynamic re-configuration.Christopher Vogt2016-11-081-1/+2
| | | | | The exact precedence rule of override code vs original code may still need to be tweaked as we go along.
* fix deprecation warnings in Eval under Scala 2.11.8Christopher Vogt2016-11-071-5/+3
|
* Make Eval tests pass and add them to cbt testsChristopher Vogt2016-11-072-6/+10
|
* Add test for overriding Eval classloaderChristopher Vogt2016-11-071-0/+7
|
* Make classloader overridable. CBT isolates classloaders, so Eval couldChristopher Vogt2016-11-071-8/+16
| | | | | only see itself, but it often needs to see things in the classloaders of user code, so now we can provie the classloader.
* Add cbt build for Eval and remove dependency on twitter util-coreChristopher Vogt2016-11-074-22/+55
|
* Add readme for Eval, pointing back to Twitter utilsChristopher Vogt2016-11-071-0/+7
|
* util-eval: Reset reporter while apply compilingnilday2016-11-072-0/+15
| | | | | | | | | | | | | | | | | | | | | | 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
* util-eval: Reset reporter between checksTomasz Bekas2016-11-072-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Eval: add Serializable to wrapping classAdrien Lavoillotte2016-11-071-1/+1
| | | | | | | | | | 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
* csl: Replace === with == in scalatest 2.x testsMoses Nakamura2016-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* util: Cleanup compiler warningsKevin Oliver2016-11-072-20/+16
| | | | | | | There are a lot of warnings when compiling util, this fixes many of them. RB_ID=739494
* Added ability to override `Reporter` used during compilation. See issue #89Simeon H.K. Fitch2016-11-072-20/+101
| | | | | | Signed-off-by: Moses Nakamura <mnakamura@twitter.com> RB_ID=572344
* Enable Scala 2.11 SBT builds for util-eval, ostrich, and finagle-ostrich4Travis Brown2016-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [split] util-* Convert all tests in util to scalatestGeorge Leontiev2016-11-073-44/+56
| | | | | | | | | | | | | | | | | | 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
* [split] Fix typo in Eval.scalaKenneth Rose2016-11-071-1/+1
| | | | | | Signed-off-by: Evan Meagher <evm@twitter.com> RB_ID=290353
* [split] finagle & util: 2.10 pattern matching strictnessBerk D. Demir2016-11-071-2/+2
| | | | | | | | 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
* [split] Gizzard: Some followup deps alignment to fix deployment classpath issuesStu Hood2016-11-071-1/+8
| | | | | RB_ID=152166 TBR=true
* [split] util-eval: fix for when class files are on the classpath directlyKoert Kuipers2016-11-071-9/+26
| | | | | | | | | | | | | 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
* Eval should now allow classpaths that included spacesStephen Judkins2016-11-071-6/+2
| | | | | Github-pull-request: https://github.com/twitter/util/pull/24 Signed-off-by: marius a. eriksen <marius@twitter.com>
* [split] capitalize Scala and document the indentation parameter.Robey Pointer2016-11-071-2/+10
|
* [split] improve the docs a bit.Robey Pointer2016-11-071-17/+14
|
* [split] merge stephenjudkins fix for spaces in classpaths.Robey Pointer2016-11-071-2/+6
|
* [split] Eval.scala: Allow @deprecatedDavid Helder2016-11-073-2/+13
| | | | | | | | The Scala compiler propagates warnings through exceptions. So Eval failed if an Eval'ed file uses something deprecated. Disable warnings. RB_ID=63167
* [split] TO MAVENmmcbride2016-11-071-2/+2
|
* [split] recompile configs based on hash instead of timestampmmcbride2016-11-072-71/+63
|
* [split] Fixing eval precompile issues with invalid characters in classnames. ↵mmcbride2016-11-073-4/+65
| | | | Also, git-review bump
* [split] Fixing mtime recompile checks for evalmmcbride2016-11-071-24/+41
|
* scaladoc mis-pluralization fixes.Berk D. Demir2016-11-071-3/+3
| | | | | @throw -> @throws @returns -> @return
* [split] - recursively process includes - allow additional include path to be ↵Jeremy Cloud2016-11-073-4/+33
| | | | specified via system property
* [split] Squashed commit of the following:mmcbride2016-11-072-35/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit faf3d257e7dc95d1492b7c8c6faf9da3c53adac6 Merge: d2ecdbd 53fdb61 Author: mmcbride <mccv@twitter.com> Date: Mon Aug 8 22:05:09 2011 -0700 Merge branch 'master' into persistent_eval commit d2ecdbddd288607cd1fb597ba04685628ad8b2f0 Author: mmcbride <mccv@twitter.com> Date: Mon Aug 8 21:40:32 2011 -0700 two minor things from jeremy cloud commit a17260bd1cd90bab0ac635e0257a9bea8e9da62f Merge: 5f26ee0 e8d277e Author: mmcbride <mccv@twitter.com> Date: Wed Aug 3 20:16:06 2011 -0700 Merge branch 'master' into persistent_eval commit 5f26ee0544ad39439c509e8b87e60c4cff0f07b9 Author: mmcbride <mccv@twitter.com> Date: Wed Aug 3 20:13:33 2011 -0700 feedback from RB commit 775c8661f485724af3be51be720b821b83b044ec Merge: 350c313 f7d1db2 Author: mmcbride <mccv@twitter.com> Date: Tue Jul 26 12:41:00 2011 -0700 Merge branch 'master' into persistent_eval commit 350c313991b31f9e332753a62ff5b92c61ce7cae Author: mmcbride <mccv@twitter.com> Date: Tue Jul 26 10:58:25 2011 -0700 persistent compilation targets for eval
* [split] add comments for future people looking for performance improvements ↵Robey Pointer2016-11-071-0/+2
| | | | in Eval
* [split] Squashed commit of the following:Arya Asemanfar2016-11-072-1/+19
| | | | | | | | | | | | | | | | | | | | | commit 86a7f2fdac93924da81f4fe7542228f071dbe617 Author: Arya Asemanfar <arya@twitter.com> Date: Fri Jun 17 11:42:44 2011 -0700 Added test for Eval.toSource commit d13c269c39514b3a20812bc594cc67a0902d248b Merge: 294e5d9 ede4550 Author: Arya Asemanfar <arya@twitter.com> Date: Fri Jun 17 10:42:02 2011 -0700 Merge branch 'master' into tfe/config_post_processing commit 294e5d982716ec31dddb18b71caea92580aaddb0 Author: Arya Asemanfar <arya@twitter.com> Date: Thu Jun 16 16:22:41 2011 -0700 Make the config in the dashboard be post-processed config
* add findClass.Robey Pointer2016-11-071-11/+25
|
* [split] Squashed commit of the following:wilhelm bierbaum2016-11-075-4/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit ead2b12ebf8c8c9b0d191235119cea7be01a22e8 Author: wilhelm bierbaum <wilhelm@twitter.com> Date: Fri Apr 29 13:20:37 2011 -0700 use StreamIO commit 23a12f4b8c40facaad4a81a363d02a3914897267 Merge: 59da183 90a1dd0 Author: wilhelm bierbaum <wilhelm@twitter.com> Date: Fri Apr 29 13:20:16 2011 -0700 Merge remote-tracking branch 'origin/master' into eval_include_directives commit 59da18308707f6d285e4b65e7e7a33aa62af77ab Merge: 4296624 f6ead9a Author: wilhelm bierbaum <wilhelm@twitter.com> Date: Thu Apr 28 23:58:18 2011 -0700 Merge remote-tracking branch 'origin/master' into eval_include_directives Conflicts: util/util-eval/src/test/scala/com/twitter/util/EvaluatorSpec.scala commit 42966245dc24d2026a8b3955e3c313445a93ac3e Merge: a0aa60e d98d9c9 Author: Wilhelm Bierbaum <wilhelm@twitter.com> Date: Tue Apr 19 20:05:57 2011 -0700 Merge branch 'master' into eval_include_directives commit a0aa60e80df3bd0312f3349eed61e997109fa510 Author: Wilhelm Bierbaum <wilhelm@twitter.com> Date: Tue Apr 19 20:05:46 2011 -0700 revert inadvertent changes commit 931be4dce6dd82ec2ef8d09f8576c9a27f50640a Author: Wilhelm Bierbaum <wilhelm@twitter.com> Date: Tue Apr 19 17:10:19 2011 -0700 introduce a preprocessor that can #include files from the filesystem (by default rooted in ./ or ./config) or the classpath into the Eval-based config compiler
* [split] Eval.scala: Add Eval.checkDavid Helder2016-11-072-5/+44
| | | | | | | | EvalSpec.scala: Rename, update for new API. Note one test fails (commented out) Future.scala, ScribeHandlerSpec.scala: Fix warnings
* [split] whitespaceJeremy Cloud2016-11-071-1/+1
|
* [split] deprecated global Eval object in favor or Eval instances which can be GCJeremy Cloud2016-11-071-7/+12
|
* allow in-place eval of the type scrooge would like to do.sRobey Pointer2016-11-072-13/+36
|
* [bc] util: fix EvaluatorSpec to be path indepedent.marius a. eriksen2016-11-071-6/+6
|
* rebuild the classloader on resetRobey Pointer2016-11-071-1/+2
|
* change path for EvaluatorSpec test resourcesMatt Freels2016-11-071-1/+1
|
* looks like we only ever ask for a jarPathOfClass if we're looking for ↵Robey Pointer2016-11-071-2/+0
| | | | something fundamental to compiling, so go ahead and throw an exception.
* throw a reasonable error if we can't find scala-compiler or scala-library. ↵Robey Pointer2016-11-071-2/+13
| | | | this can be really hard to puzzle out from the base exception.