Skip to content

Commit

Permalink
Merge pull request #2123 from scalacenter/update/zinc-1.9.3
Browse files Browse the repository at this point in the history
build(deps): Update zinc from 1.9.2 to 1.9.3
  • Loading branch information
tgodzik authored Jul 27, 2023
2 parents 1e7d195 + f0fac2d commit 72a858a
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ import xsbti.compile.ClassFileManager
import xsbti.compile.IncOptions
import xsbti.compile.Output
import xsbti.compile.analysis.ReadStamps
import xsbti.{Action, DiagnosticCode, DiagnosticRelatedInformation}

trait IBloopAnalysisCallback extends xsbti.AnalysisCallback {
import collection.JavaConverters._

trait IBloopAnalysisCallback extends xsbti.AnalysisCallback2 {
def get: Analysis
}

Expand Down Expand Up @@ -115,21 +118,46 @@ final class BloopAnalysisCallback(
startSource(converter.toVirtualFile(source.toPath()))
}

def problem(
def problem2(
category: String,
pos: Position,
msg: String,
severity: Severity,
reported: Boolean
reported: Boolean,
rendered: ju.Optional[String],
diagnosticCode: ju.Optional[DiagnosticCode],
diagnosticRelatedInformation: ju.List[DiagnosticRelatedInformation],
actions: ju.List[Action]
): Unit = {
for (source <- InterfaceUtil.jo2o(pos.sourceFile)) {
val map = if (reported) reportedProblems else unreportedProblems
map
.getOrElseUpdate(source.toPath(), new mutable.ListBuffer())
.+=(InterfaceUtil.problem(category, pos, msg, severity, None, None, Nil))
.+=(
InterfaceUtil.problem(
category,
pos,
msg,
severity,
None,
InterfaceUtil.toOption(diagnosticCode),
diagnosticRelatedInformation.asScala.toList,
actions.asScala.toList
)
)
}
}

def problem(
category: String,
pos: Position,
msg: String,
severity: Severity,
reported: Boolean
): Unit = {
problem(category, pos, msg, severity, reported)
}

def classDependency(
onClassName: String,
sourceClassName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ import xsbti.compile.ClassFileManager
import xsbti.compile.IncOptions
import xsbti.compile.Output
import xsbti.compile.analysis.ReadStamps
import xsbti.{Action, DiagnosticCode, DiagnosticRelatedInformation}

import collection.JavaConverters._

/**
* This class provides a thread-safe implementation of `xsbti.AnalysisCallback` which is required to compile with the
Expand Down Expand Up @@ -123,21 +126,56 @@ final class ConcurrentAnalysisCallback(
startSource(converter.toVirtualFile(source.toPath()))
}

def problem(
def problem2(
category: String,
pos: Position,
msg: String,
severity: Severity,
reported: Boolean
reported: Boolean,
rendered: ju.Optional[String],
diagnosticCode: ju.Optional[DiagnosticCode],
diagnosticRelatedInformation: ju.List[DiagnosticRelatedInformation],
actions: ju.List[Action]
): Unit = {
for (source <- InterfaceUtil.jo2o(pos.sourceFile)) {
val map = if (reported) reportedProblems else unreportedProblems
map
.getOrElseUpdate(source.toPath(), new ConcurrentLinkedQueue)
.add(InterfaceUtil.problem(category, pos, msg, severity, None, None, Nil))
.add(
InterfaceUtil.problem(
category,
pos,
msg,
severity,
None,
InterfaceUtil.toOption(diagnosticCode),
diagnosticRelatedInformation.asScala.toList,
actions.asScala.toList
)
)
}
}

def problem(
category: String,
pos: Position,
msg: String,
severity: Severity,
reported: Boolean
): Unit = {
problem2(
category,
pos,
msg,
severity,
reported,
rendered = ju.Optional.empty(),
diagnosticCode = ju.Optional.empty(),
diagnosticRelatedInformation = Nil.asJava,
actions = Nil.asJava
)
}

def classDependency(
onClassName: String,
sourceClassName: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sbt.version=1.9.2
sbt.version=1.9.3

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sbt.version=1.9.2
sbt.version=1.9.3

Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.2
sbt.version=1.9.3
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.2
sbt.version=1.9.3
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.2
sbt.version=1.9.3
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.2
sbt.version=1.9.3
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.2
sbt.version=1.9.3
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.2
sbt.version=1.9.3
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.2
sbt.version=1.9.3
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ object Dependencies {
val nailgunCommit = "a2520c1e"

// Keep in sync in BloopComponentCompiler
val zincVersion = "1.9.2"
val zincVersion = "1.9.3"

val bspVersion = "2.1.0-M5"

Expand All @@ -26,7 +26,7 @@ object Dependencies {
val caseAppVersion = "2.0.6"
val sourcecodeVersion = "0.3.0"
val sbtTestInterfaceVersion = "1.0"
val sbtTestAgentVersion = "1.9.2"
val sbtTestAgentVersion = "1.9.3"
val junitVersion = "0.13.3"
val directoryWatcherVersion = "0.8.0+6-f651bd93"
val monixVersion = "3.2.0"
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.2
sbt.version=1.9.3

0 comments on commit 72a858a

Please sign in to comment.