Skip to content

Remove DRI from Scaladoc warnings #22330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading