Skip to content

Commit 4691607

Browse files
committed
Add source links to dotty library. Add icons to givens
1 parent e08fd59 commit 4691607

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

project/Build.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,11 @@ object Build {
16111611
val stdLibRoot = projectRoot.relativize(managedSources.toPath.normalize())
16121612
val docRootFile = stdLibRoot.resolve("rootdoc.txt")
16131613

1614+
val dottyManagesSources =
1615+
(`stdlib-bootstrapped`/Compile/sourceManaged).value / "dotty-library-src"
1616+
1617+
val dottyLibRoot = projectRoot.relativize(dottyManagesSources.toPath.normalize())
1618+
16141619
if (dottyJars.isEmpty) Def.task { streams.value.log.error("Dotty lib wasn't found") }
16151620
else Def.task{
16161621
IO.write(dest / "versions" / "latest-nightly-base", majorVersion)
@@ -1638,6 +1643,7 @@ object Build {
16381643
"gitter::https://gitter.im/scala/scala," +
16391644
"twitter::https://twitter.com/scala_lang",
16401645
s"-source-links:" +
1646+
s"$dottyLibRoot=github://lampepfl/dotty/master#library/src," +
16411647
s"$stdLibRoot=github://scala/scala/v${stdlibVersion(Bootstrapped)}#src/library," +
16421648
s"docs=github://lampepfl/dotty/master#docs",
16431649
"-doc-root-content", docRootFile.toString

scaladoc/src/dotty/tools/scaladoc/renderers/HtmlRenderer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ class HtmlRenderer(rootPackage: Member, val members: Map[DRI, Member])(using ctx
141141
)
142142

143143
private def buildNavigation(pageLink: Link): AppliedTag =
144-
def navigationIcon(member: Member) = member.kind match {
145-
case m if m.isInstanceOf[Classlike] => Seq(span(cls := s"micon ${member.kind.name.head}"))
144+
def navigationIcon(member: Member) = member match {
145+
case m if m.needsOwnPage => Seq(span(cls := s"micon ${member.kind.name.head}"))
146146
case _ => Nil
147147
}
148148

0 commit comments

Comments
 (0)