Skip to content

Commit

Permalink
Update semanticdb version to 4.2.5, remove 2.12.7 and deprecate 2.12.…
Browse files Browse the repository at this point in the history
…8/2.12.9.
  • Loading branch information
tgodzik committed Nov 4, 2019
1 parent 220578c commit 9845bb6
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 22 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ lazy val V = new {
val scala211 = "2.11.12"
val scala212 = "2.12.10"
val scala213 = "2.13.1"
val scalameta = "4.2.3"
val scalameta = "4.2.5"
val semanticdb = scalameta
val bsp = "2.0.0-M4+10-61e61e87"
val bloop = "1.3.5"
Expand All @@ -150,8 +150,8 @@ lazy val V = new {
// List of supported Scala versions in SemanticDB. Needs to be manually updated
// for every SemanticDB upgrade.
def supportedScalaVersions =
Seq("2.13.0", scala213, "2.12.8", "2.12.9", scala212) ++ deprecatedScalaVersions
def deprecatedScalaVersions = Seq("2.12.7", scala211)
Seq("2.13.0", scala213, scala212) ++ deprecatedScalaVersions
def deprecatedScalaVersions = Seq("2.12.8", "2.12.9", scala211)
def guava = "com.google.guava" % "guava" % "28.0-jre"
def lsp4j = "org.eclipse.lsp4j" % "org.eclipse.lsp4j" % "0.8.0"
def dap4j =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ object SymbolOccurrenceOrdering {
a.startCharacter,
b.startCharacter
)
byCharacter
if (byCharacter != 0) {
byCharacter
} else {
val byEnd = Integer.compare(
a.endCharacter,
b.endCharacter
)
byEnd
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ object GradleLspSuite extends BaseImportSuite("gradle-import") {
_ = assertNoDiff(
client.messageRequests.peekLast(),
// only 3 projects since no empty test targets are created for gradle
CheckDoctor.multipleMisconfiguredProjects(4)
CheckDoctor.multipleMisconfiguredProjects(5)
)
_ <- Future.sequence(
('a' to 'f')
Expand Down
1 change: 1 addition & 0 deletions tests/slow/src/test/scala/tests/sbt/SbtLspSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ object SbtLspSuite extends BaseImportSuite("sbt-import") {
|sbt.version=1.2.6
|/build.sbt
|version := "1.0"
|scalaVersion := "2.12.10"
|""".stripMargin,
expectError = true
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package example

import io.circe.derivation.annotations.JsonCodec/*io.circe.derivation.annotations.JsonCodec.*//*io.circe.derivation.annotations.JsonCodec#*/

@JsonCodec/*example.MacroAnnotation#*/
@/*local27*/JsonCodec/*example.MacroAnnotation#*/
// FIXME: https://github.com/scalameta/scalameta/issues/1789/*java.lang.Object#`<init>`().*/
case class MacroAnnotation(
name/*example.MacroAnnotation#name.*/: String/*scala.Predef.String#*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package example

class ReflectiveInvocation/*example.ReflectiveInvocation#*/ {
new Serializable/*scala.Serializable#*/ /*java.lang.Object#`<init>`().*/{
new /*local1*/Serializable/*scala.Serializable#*/ /*java.lang.Object#`<init>`().*/{
def message/*local0*/ = "message"
// reflective invocation
}.message/*local0*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object StructuralTypes/*example.StructuralTypes.*/ {

val V/*example.StructuralTypes.V.*/: Object/*java.lang.Object#*/ {
def scalameta/*local2*/: String/*scala.Predef.String#*/
} = new {
} = new /*local3*/{
def scalameta/*local4*/ = "4.0"
}
V/*example.StructuralTypes.V.*/.scalameta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ object LocalDeclarations/*example.nested.LocalDeclarations.*/ {
def create/*example.nested.LocalDeclarations.create().*/(): LocalDeclarations/*example.nested.LocalDeclarations#*/ = {
def bar/*local0*/(): Unit/*scala.Unit#*/ = ()

val x/*local1*/ = new {
val x/*local1*/ = new /*local3*/{
val x/*local2*/ = 2
}

val y/*local4*/ = new Foo/*example.nested.Foo#*/ /*java.lang.Object#`<init>`().*/{}
val y/*local4*/ = new /*local5*/Foo/*example.nested.Foo#*/ /*java.lang.Object#`<init>`().*/{}

new LocalDeclarations/*example.nested.LocalDeclarations#*/ /*java.lang.Object#`<init>`().*/with Foo/*example.nested.Foo#*/ {
new /*local6*/LocalDeclarations/*example.nested.LocalDeclarations#*/ /*java.lang.Object#`<init>`().*/with Foo/*example.nested.Foo#*/ {
override def foo/*local7*/(): Unit/*scala.Unit#*/ = bar/*local0*/()
}

Expand Down
21 changes: 10 additions & 11 deletions tests/unit/src/test/scala/tests/ImplementationSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -462,17 +462,16 @@ object ImplementationSuite extends BaseLspSuite("implementation") {
|""".stripMargin
)

// TODO needs scalameta update
// check(
// "anon",
// """|/a/src/main/scala/a/Main.scala
// |package a
// |trait A@@nimal
// |object Main{
// | val animal = new <<Animal>>{ def field(d : String) : Int = 123 }
// |}
// |""".stripMargin
// )
check(
"anon",
"""|/a/src/main/scala/a/Main.scala
|package a
|trait A@@nimal
|object Main{
| val animal = new <<>>Animal{ def field(d : String) : Int = 123 }
|}
|""".stripMargin
)

check(
"anon-method",
Expand Down

0 comments on commit 9845bb6

Please sign in to comment.