Skip to content

Scaladoc: Add source links to dotty library. Add icons to givens #11714

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
Mar 22, 2021
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
6 changes: 6 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1611,6 +1611,11 @@ object Build {
val stdLibRoot = projectRoot.relativize(managedSources.toPath.normalize())
val docRootFile = stdLibRoot.resolve("rootdoc.txt")

val dottyManagesSources =
(`stdlib-bootstrapped`/Compile/sourceManaged).value / "dotty-library-src"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space


val dottyLibRoot = projectRoot.relativize(dottyManagesSources.toPath.normalize())

if (dottyJars.isEmpty) Def.task { streams.value.log.error("Dotty lib wasn't found") }
else Def.task{
IO.write(dest / "versions" / "latest-nightly-base", majorVersion)
Expand Down Expand Up @@ -1638,6 +1643,7 @@ object Build {
"gitter::https://gitter.im/scala/scala," +
"twitter::https://twitter.com/scala_lang",
s"-source-links:" +
s"$dottyLibRoot=github://lampepfl/dotty/master#library/src," +
s"$stdLibRoot=github://scala/scala/v${stdlibVersion(Bootstrapped)}#src/library," +
s"docs=github://lampepfl/dotty/master#docs",
"-doc-root-content", docRootFile.toString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ class HtmlRenderer(rootPackage: Member, val members: Map[DRI, Member])(using ctx
)

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

Expand Down