Skip to content

Commit

Permalink
Backport "bugfix: Catch exception from the compiler for broken shadow…
Browse files Browse the repository at this point in the history
…ed pickles" to LTS (#20670)

Backports #18502 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
  • Loading branch information
WojciechMazur committed Jun 20, 2024
2 parents c0da8f9 + 93f78de commit 3e8f537
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class CompilerSearchVisitor(
private def isAccessible(sym: Symbol): Boolean = try
sym != NoSymbol && sym.isPublic && sym.isStatic
catch
case err: AssertionError =>
logger.log(Level.WARNING, err.getMessage())
false
case NonFatal(e) =>
reports.incognito.create(
Report(
Expand Down Expand Up @@ -64,8 +67,14 @@ class CompilerSearchVisitor(
.stripSuffix("$")
.split("\\$")

val added = toSymbols(pkg, innerPath.toList).filter(visitSymbol)
val added =
try toSymbols(pkg, innerPath.toList).filter(visitSymbol)
catch
case NonFatal(e) =>
logger.log(Level.WARNING, e.getMessage(), e)
Nil
added.size
end visitClassfile

def visitWorkspaceSymbol(
path: java.nio.file.Path,
Expand Down

0 comments on commit 3e8f537

Please sign in to comment.