File tree Expand file tree Collapse file tree 9 files changed +28
-16
lines changed
metals/src/main/scala/scala/meta/internal
mtags/src/main/scala-2/scala/meta/internal/pc
sbt-metals/src/sbt-test/sbt-metals/semanticdb
cross/src/test/scala/tests/pc
slow/src/test/scala/tests/bazel Expand file tree Collapse file tree 9 files changed +28
-16
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ object MtagsResolver {
96
96
" 2.13.11" -> " 1.3.5" ,
97
97
" 3.2.2" -> " 1.3.5" ,
98
98
" 3.3.2" -> " 1.3.5" ,
99
+ " 2.13.12" -> " 1.4.2" ,
99
100
)
100
101
101
102
class Default extends MtagsResolver {
Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ object ScalacpCopyPaste {
315
315
316
316
private var nextId = 0
317
317
private def freshSymbol (): String = {
318
- val result = Symbols .Local (nextId.toString )
318
+ val result = Symbols .Local (nextId)
319
319
nextId += 1
320
320
result
321
321
}
Original file line number Diff line number Diff line change @@ -124,7 +124,10 @@ class MetalsGlobal(
124
124
125
125
def semanticdbSymbol (symbol : Symbol ): String = {
126
126
import semanticdbOps ._
127
- symbol.toSemantic
127
+ val semantic = symbol.toSemantic
128
+ if (symbol == null ) " "
129
+ else if (semantic.isEmpty()) symbol.nameString
130
+ else semantic
128
131
}
129
132
130
133
def printPretty (pos : sourcecode.Text [Position ]): Unit = {
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ object V {
11
11
12
12
// When you can add to removedScalaVersions in MtagsResolver.scala with the last released version
13
13
val sbtScala = " 2.12.18"
14
- val ammonite212Version = " 2.12.19 "
15
- val ammonite213Version = " 2.13.14 "
14
+ val ammonite212Version = " 2.12.20 "
15
+ val ammonite213Version = " 2.13.15 "
16
16
// Rules need to be manually updated to support
17
17
val bazelScalaVersion = " 2.13.12"
18
18
val ammonite3Version = " 3.3.4"
@@ -45,7 +45,7 @@ object V {
45
45
val scalaCli = " 1.6.1"
46
46
val scalafix = " 0.14.0"
47
47
val scalafmt = " 3.7.15"
48
- val scalameta = " 4.12.3 "
48
+ val scalameta = " 4.12.7 "
49
49
val scribe = " 3.16.0"
50
50
val qdox = " 2.2.0"
51
51
@@ -149,7 +149,6 @@ object V {
149
149
" 2.12.19" ,
150
150
" 2.12.18" ,
151
151
" 2.12.17" ,
152
- " 2.13.12" ,
153
152
" 2.13.13" ,
154
153
" 2.13.14" ,
155
154
" 2.13.15" ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ val checkSemanticdb =
7
7
lazy val a = project
8
8
.in(file(" a" ))
9
9
.settings(
10
- scalaVersion := " 2.13.12 " ,
10
+ scalaVersion := " 2.13.16 " ,
11
11
inConfig(Compile ) {
12
12
checkSemanticdb := {
13
13
assertSemanticdbForScala2.value
Original file line number Diff line number Diff line change @@ -466,23 +466,27 @@ class PcRenameSuite extends BasePcRenameSuite {
466
466
" for-comp-bind" ,
467
467
"""
468
468
|case class Bar(fooBar: Int, goo: Int)
469
- |val abc = for {
469
+ |object B {
470
+ | val abc = for {
470
471
| foo <- List(1)
471
472
| _ = Option(1)
472
473
| Bar(<<fooBar>>, goo) <- List(Bar(foo, 123))
473
474
| baz = <<fooBar>> + goo
474
- |} yield {
475
+ | } yield {
475
476
| val x = foo + <<foo@@Bar>> + baz
476
477
| x
478
+ | }
477
479
|}""" .stripMargin
478
480
)
479
481
480
482
check(
481
483
" for-comprehension" ,
482
- """ |val a = for {
484
+ """ |object B {
485
+ | val a = for {
483
486
| <<ab@@c>> <- List("a", "b", "c")
484
487
| _ = println("print!")
485
- |} yield <<a@@bc>>
488
+ | } yield <<a@@bc>>
489
+ |}
486
490
|""" .stripMargin
487
491
)
488
492
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ class BazelLspSuite
47
47
_ = assertNoDiff(
48
48
client.workspaceMessageRequests,
49
49
List (
50
- importMessage
50
+ importMessage,
51
+ Messages .DeprecatedRemovedScalaVersion .message(Set (" 2.13.12" )),
51
52
).mkString(" \n " ),
52
53
)
53
54
_ = assert(bazelBspConfig.exists)
@@ -127,7 +128,10 @@ class BazelLspSuite
127
128
|""" .stripMargin,
128
129
)
129
130
} yield {
130
- assertEmpty(client.workspaceMessageRequests)
131
+ assertEquals(
132
+ client.workspaceMessageRequests,
133
+ Messages .DeprecatedRemovedScalaVersion .message(Set (" 2.13.12" )),
134
+ )
131
135
assert(bazelBspConfig.exists)
132
136
server.assertBuildServerConnection()
133
137
}
@@ -193,7 +197,8 @@ class BazelLspSuite
193
197
assertNoDiff(
194
198
client.workspaceMessageRequests,
195
199
List (
196
- Messages .ResetWorkspace .message
200
+ Messages .DeprecatedRemovedScalaVersion .message(Set (" 2.13.12" )),
201
+ Messages .ResetWorkspace .message,
197
202
).mkString(" \n " ),
198
203
)
199
204
assert(bazelBspConfig.exists)
Original file line number Diff line number Diff line change @@ -19,6 +19,6 @@ class PatternMatching/*PatternMatching.scala*/ {
19
19
def localDeconstruction /* PatternMatching.scala*/ = {
20
20
val Some /* Option.scala*/ (number2/* PatternMatching.semanticdb*/ ) =
21
21
some/* PatternMatching.scala*/
22
- number2/* PatternMatching.semanticdb */
22
+ number2/* no local definition */
23
23
}
24
24
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class PatternMatching/*example.PatternMatching#*/ {
17
17
println/* scala.Predef.println(+1).*/ (number1/* example.PatternMatching#number1.*/ )
18
18
19
19
def localDeconstruction /* example.PatternMatching#localDeconstruction().*/ = {
20
- val Some /* scala.Some.*/ (number2/* local4 */ ) =
20
+ val Some /* scala.Some.*/ (number2/* local5 */ ) =
21
21
some/* example.PatternMatching#some.*/
22
22
number2/* local4*/
23
23
}
You can’t perform that action at this time.
0 commit comments