Skip to content

Commit 2364d99

Browse files
authored
Merge pull request #230 from scala/backport-lts-3.3-22330
Backport "Remove DRI from Scaladoc warnings" to 3.3 LTS
2 parents c1d129b + 1a9e6e4 commit 2364d99

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ trait TypesSupport:
7575
else inner(tpe) ++ plain(".").l ++ suffix
7676
case tpe => inner(tpe)
7777

78-
// TODO #23 add support for all types signatures that makes sense
78+
// TODO #23 add support for all types signatures that make sense
7979
private def inner(
8080
using Quotes,
8181
)(
@@ -87,7 +87,7 @@ trait TypesSupport:
8787
): SSignature =
8888
import reflect._
8989
def noSupported(name: String): SSignature =
90-
println(s"WARN: Unsupported type: $name: ${tp.show}")
90+
report.warning(s"Unsupported type: $name: ${tp.show}")
9191
plain(s"Unsupported[$name]").l
9292
tp match
9393
case OrType(left, right) =>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ abstract class MarkupConversion[T](val repr: Repr)(using dctx: DocContext) {
112112
case None => sym.dri
113113
DocLink.ToDRI(dri, targetText)
114114
case None =>
115-
val txt = s"No DRI found for query"
115+
val txt = s"Couldn't resolve a member for the given link query"
116116
val msg = s"$txt: $queryStr"
117117

118118
if (!summon[DocContext].args.noLinkWarnings) then

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ trait MemberLookup {
3131
def nearestPackage(sym: Symbol): Symbol =
3232
if sym.flags.is(Flags.Package) then sym else nearestPackage(sym.owner)
3333

34-
def nearestMembered(sym: Symbol): Symbol =
35-
if sym.isClassDef || sym.flags.is(Flags.Package) then sym else nearestMembered(sym.owner)
34+
def nearestMember(sym: Symbol): Symbol =
35+
if sym.isClassDef || sym.flags.is(Flags.Package) then sym else nearestMember(sym.owner)
3636

3737
val res: Option[(Symbol, String, Option[Symbol])] = {
3838
def toplevelLookup(querystrings: List[String]) =
@@ -43,7 +43,7 @@ trait MemberLookup {
4343

4444
ownerOpt match {
4545
case Some(owner) =>
46-
val nearest = nearestMembered(owner)
46+
val nearest = nearestMember(owner)
4747
val nearestCls = nearestClass(owner)
4848
val nearestPkg = nearestPackage(owner)
4949
def relativeLookup(querystrings: List[String], owner: Symbol): Option[(Symbol, Option[Symbol])] = {

scaladoc/src/dotty/tools/scaladoc/tasty/comments/wiki/Entities.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import scala.collection.{Seq => _, _}
55
// import representations._
66

77
/** A body of text. A comment has a single body, which is composed of
8-
* at least one block. Inside every body is exactly one summary (see
9-
* [[scala.tools.nsc.doc.model.comment.Summary]]). */
8+
* at least one block. Inside every body is exactly one summary. */
109
final case class Body(blocks: Seq[Block]) {
1110

1211
/** The summary text of the comment body. */

0 commit comments

Comments
 (0)