Skip to content

Commit

Permalink
chore: Bump scalameta to 4.12.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Jan 24, 2025
1 parent fbc4f9f commit a3b9f73
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ object MtagsResolver {
"2.13.11" -> "1.3.5",
"3.2.2" -> "1.3.5",
"3.3.2" -> "1.3.5",
"2.13.12" -> "1.4.2",
)

class Default extends MtagsResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ object ScalacpCopyPaste {

private var nextId = 0
private def freshSymbol(): String = {
val result = Symbols.Local(nextId.toString)
val result = Symbols.Local(nextId)
nextId += 1
result
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ class MetalsGlobal(

def semanticdbSymbol(symbol: Symbol): String = {
import semanticdbOps._
symbol.toSemantic
val semantic = symbol.toSemantic
if (symbol == null) ""
else if (semantic.isEmpty()) symbol.nameString
else semantic
}

def printPretty(pos: sourcecode.Text[Position]): Unit = {
Expand Down
7 changes: 3 additions & 4 deletions project/V.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ object V {

// When you can add to removedScalaVersions in MtagsResolver.scala with the last released version
val sbtScala = "2.12.18"
val ammonite212Version = "2.12.19"
val ammonite213Version = "2.13.14"
val ammonite212Version = "2.12.20"
val ammonite213Version = "2.13.15"
// Rules need to be manually updated to support
val bazelScalaVersion = "2.13.12"
val ammonite3Version = "3.3.4"
Expand Down Expand Up @@ -45,7 +45,7 @@ object V {
val scalaCli = "1.6.1"
val scalafix = "0.14.0"
val scalafmt = "3.7.15"
val scalameta = "4.12.3"
val scalameta = "4.12.7"
val scribe = "3.16.0"
val qdox = "2.2.0"

Expand Down Expand Up @@ -149,7 +149,6 @@ object V {
"2.12.19",
"2.12.18",
"2.12.17",
"2.13.12",
"2.13.13",
"2.13.14",
"2.13.15",
Expand Down
2 changes: 1 addition & 1 deletion sbt-metals/src/sbt-test/sbt-metals/semanticdb/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ val checkSemanticdb =
lazy val a = project
.in(file("a"))
.settings(
scalaVersion := "2.13.12",
scalaVersion := "2.13.16",
inConfig(Compile) {
checkSemanticdb := {
assertSemanticdbForScala2.value
Expand Down
12 changes: 8 additions & 4 deletions tests/cross/src/test/scala/tests/pc/PcRenameSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -466,23 +466,27 @@ class PcRenameSuite extends BasePcRenameSuite {
"for-comp-bind",
"""
|case class Bar(fooBar: Int, goo: Int)
|val abc = for {
|object B {
| val abc = for {
| foo <- List(1)
| _ = Option(1)
| Bar(<<fooBar>>, goo) <- List(Bar(foo, 123))
| baz = <<fooBar>> + goo
|} yield {
| } yield {
| val x = foo + <<foo@@Bar>> + baz
| x
| }
|}""".stripMargin
)

check(
"for-comprehension",
"""|val a = for {
"""|object B {
| val a = for {
| <<ab@@c>> <- List("a", "b", "c")
| _ = println("print!")
|} yield <<a@@bc>>
| } yield <<a@@bc>>
|}
|""".stripMargin
)

Expand Down
11 changes: 8 additions & 3 deletions tests/slow/src/test/scala/tests/bazel/BazelLspSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class BazelLspSuite
_ = assertNoDiff(
client.workspaceMessageRequests,
List(
importMessage
importMessage,
Messages.DeprecatedRemovedScalaVersion.message(Set("2.13.12")),
).mkString("\n"),
)
_ = assert(bazelBspConfig.exists)
Expand Down Expand Up @@ -127,7 +128,10 @@ class BazelLspSuite
|""".stripMargin,
)
} yield {
assertEmpty(client.workspaceMessageRequests)
assertEquals(
client.workspaceMessageRequests,
Messages.DeprecatedRemovedScalaVersion.message(Set("2.13.12")),
)
assert(bazelBspConfig.exists)
server.assertBuildServerConnection()
}
Expand Down Expand Up @@ -193,7 +197,8 @@ class BazelLspSuite
assertNoDiff(
client.workspaceMessageRequests,
List(
Messages.ResetWorkspace.message
Messages.DeprecatedRemovedScalaVersion.message(Set("2.13.12")),
Messages.ResetWorkspace.message,
).mkString("\n"),
)
assert(bazelBspConfig.exists)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class PatternMatching/*PatternMatching.scala*/ {
def localDeconstruction/*PatternMatching.scala*/ = {
val Some/*Option.scala*/(number2/*PatternMatching.semanticdb*/) =
some/*PatternMatching.scala*/
number2/*PatternMatching.semanticdb*/
number2/*no local definition*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PatternMatching/*example.PatternMatching#*/ {
println/*scala.Predef.println(+1).*/(number1/*example.PatternMatching#number1.*/)

def localDeconstruction/*example.PatternMatching#localDeconstruction().*/ = {
val Some/*scala.Some.*/(number2/*local4*/) =
val Some/*scala.Some.*/(number2/*local5*/) =
some/*example.PatternMatching#some.*/
number2/*local4*/
}
Expand Down

0 comments on commit a3b9f73

Please sign in to comment.