Skip to content

Commit

Permalink
Remove DRI from Scaladoc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperFKorban committed Jan 9, 2025
1 parent dc0bb59 commit 8ae9e01
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ trait TypesSupport:
else inner(tpe) ++ plain(".").l ++ suffix
case tpe => inner(tpe)

// TODO #23 add support for all types signatures that makes sense
// TODO #23 add support for all types signatures that make sense
private def inner(
using Quotes,
)(
Expand All @@ -88,7 +88,7 @@ trait TypesSupport:
): SSignature =
import reflect._
def noSupported(name: String): SSignature =
println(s"WARN: Unsupported type: $name: ${tp.show}")
report.warning(s"Unsupported type: $name: ${tp.show}")
plain(s"Unsupported[$name]").l
tp match
case OrType(left, right) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ abstract class MarkupConversion[T](val repr: Repr)(using dctx: DocContext) {
case None => sym.dri
DocLink.ToDRI(dri, targetText)
case None =>
val txt = s"No DRI found for query"
val txt = s"Couldn't resolve a member for the given link query"
val msg = s"$txt: $queryStr"

if (!summon[DocContext].args.noLinkWarnings) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ trait MemberLookup {
def nearestPackage(sym: Symbol): Symbol =
if sym.flags.is(Flags.Package) then sym else nearestPackage(sym.owner)

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

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

ownerOpt match {
case Some(owner) =>
val nearest = nearestMembered(owner)
val nearest = nearestMember(owner)
val nearestCls = nearestClass(owner)
val nearestPkg = nearestPackage(owner)
def relativeLookup(querystrings: List[String], owner: Symbol): Option[(Symbol, Option[Symbol])] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import scala.collection.{Seq => _, _}
// import representations._

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

/** The summary text of the comment body. */
Expand Down

0 comments on commit 8ae9e01

Please sign in to comment.