Skip to content

Commit bc39fea

Browse files
authored
Revert "better workaround for the scala reflect bug (#1100)" (#1102)
This reverts commit 4a7f108.
1 parent 4a7f108 commit bc39fea

4 files changed

Lines changed: 5 additions & 38 deletions

File tree

console/build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ scalacOptions -= "-Xfatal-warnings"
4848
val ScoptVersion = "3.7.1"
4949
val BetterFilesVersion = "3.8.0"
5050
val CaskVersion = "0.7.8"
51-
val CatsVersion = "2.3.1"
51+
val CatsVersion = "2.0.0"
5252
val CirceVersion = "0.12.2"
53-
val AmmoniteVersion = "2.3.8-32-64308dc3"
53+
val AmmoniteVersion = "2.3.8-4-88785969"
5454
val ZeroturnaroundVersion = "1.13"
5555

5656
dependsOn(Projects.fuzzyc2cpg % Test)

console/src/main/scala/io/shiftleft/console/scripting/AmmoniteExecutor.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ import java.nio.file.{Files, Path}
1717
* All scripts are compiled in-memory and no caching is performed.
1818
*/
1919
trait AmmoniteExecutor {
20-
ScalaReflectWorkaround.workaroundScalaReflectBugByTriggeringReflection()
21-
2220
protected def predef: String
2321

2422
protected lazy val ammoniteMain: Main = ammonite.Main(predefCode = predef,

console/src/main/scala/io/shiftleft/console/scripting/ScalaReflectWorkaround.scala

Lines changed: 0 additions & 28 deletions
This file was deleted.

console/src/test/scala/io/shiftleft/console/QueryDatabaseTests.scala

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ object TestBundle extends QueryBundle {
1313
title = "a-title",
1414
description = s"a-description $n",
1515
score = 2.0,
16-
traversal = { cpg =>
17-
cpg.method
18-
}
16+
traversal = { cpg => cpg.method }
1917
)
2018
}
2119

@@ -44,9 +42,8 @@ class QueryDatabaseTests extends AnyWordSpec with should.Matchers {
4442
"an-author",
4543
"a-title",
4644
"a-description",
47-
2.0, { cpg: Cpg =>
48-
cpg.method
49-
}
45+
2.0,
46+
{ cpg: Cpg => cpg.method }
5047
)
5148
query.title shouldBe "a-title"
5249
query.traversalAsString shouldBe "cpg: Cpg => cpg.method"

0 commit comments

Comments
 (0)