Skip to content

Commit 6ce8d76

Browse files
Update mtags to 1.5.1
1 parent b8aed82 commit 6ce8d76

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ lazy val Version = new {
2121
def scala213 = scala213Versions.last
2222
def scala212 = scala212Versions.last
2323

24-
def mtags = "1.3.5"
24+
def mtags = "1.5.1"
2525
// Important: this should be the exact same version as the one mtags pulls, as mtags uses some scalameta internal APIs,
2626
// and binary compatibility of these APIs isn't guaranteed.
2727
// Get this version with a command like 'cs resolve org.scalameta:mtags_2.13.14:1.3.1 | grep org.scalameta:scalameta'
28-
def scalameta = "4.9.6"
28+
def scalameta = "4.12.3"
2929
}
3030

3131
inThisBuild(
@@ -295,7 +295,7 @@ lazy val core = crossProject(JVMPlatform, JSPlatform)
295295
baseDirectory.value./("../src/main/protobuf")
296296
),
297297
libraryDependencies ++= List(
298-
"org.scalameta" %%% "scalameta" % Version.scalameta,
298+
"org.scalameta" %% "semanticdb-shared" % Version.scalameta,
299299
"com.thesamet.scalapb" %%% "scalapb-runtime" % scalapbVersion % "protobuf"
300300
)
301301
)

metabrowse-server/src/main/scala/metabrowse/server/MetabrowseServer.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ class MetabrowseServer(
323323
doc <- try {
324324
val timeout = TimeUnit.SECONDS.toMillis(10)
325325
val textDocument = if (path.lastOpt.exists(_.endsWith(".java"))) {
326+
import scala.meta.internal.metals.{EmptyReportContext, ReportContext}
327+
implicit val rc: ReportContext = EmptyReportContext
326328
val input = Input.VirtualFile(path.toString, text)
327329
t.JavaMtags.index(input, includeMembers = true).index()
328330
} else {
@@ -356,8 +358,11 @@ class MetabrowseServer(
356358
None
357359
}
358360
input = defn.path.toInput
359-
doc = if (input.path.endsWith(".java"))
361+
doc = if (input.path.endsWith(".java")) {
362+
import scala.meta.internal.metals.{EmptyReportContext, ReportContext}
363+
implicit val rc: ReportContext = EmptyReportContext
360364
t.JavaMtags.index(input, includeMembers = true).index()
365+
}
361366
else
362367
t.ScalaMtags.index(input, dialect).index()
363368
occ <- doc.occurrences

0 commit comments

Comments
 (0)