Skip to content

Commit 65f32ea

Browse files
committed
Update logging
1 parent b866f79 commit 65f32ea

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/comments/MemberLookup.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import scala.quoted._
55

66
trait MemberLookup {
77

8-
def lookup(using Quotes)(
8+
def lookup(using Quotes, DocContext)(
99
query: Query,
1010
owner: quotes.reflect.Symbol,
1111
): Option[(quotes.reflect.Symbol, String)] = lookupOpt(query, Some(owner))
1212

13-
def lookupOpt(using Quotes)(
13+
def lookupOpt(using Quotes, DocContext)(
1414
query: Query,
1515
ownerOpt: Option[quotes.reflect.Symbol],
1616
): Option[(quotes.reflect.Symbol, String)] =
@@ -79,8 +79,8 @@ trait MemberLookup {
7979
catch
8080
case e: Exception =>
8181
// TODO (https://github.com/lampepfl/scala3doc/issues/238): proper reporting
82-
println(s"[WARN] Unable to find a link for ${query} ${ownerOpt.fold("")(o => "in " + o.name)}")
83-
e.printStackTrace()
82+
val msg = s"Unable to find a link for ${query} ${ownerOpt.fold("")(o => "in " + o.name)}"
83+
report.warn(msg, e)
8484
None
8585

8686
private def hackMembersOf(using Quotes)(rsym: quotes.reflect.Symbol) = {

scaladoc/test/dotty/tools/scaladoc/tasty/comments/MemberLookupTests.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import dotty.tools.scaladoc.tasty.util._
99

1010
class LookupTestCases[Q <: Quotes](val q: Quotes) {
1111

12+
given DocContext = testDocContext()
13+
1214
def testAll(): Unit = {
1315
testOwnerlessLookup()
1416
testOwnedLookup()

0 commit comments

Comments
 (0)