Skip to content

Migrate away from dokka: Part 1 #11183

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 12 commits into from
Jan 30, 2021

Conversation

romanowski
Copy link
Contributor

No description provided.

@romanowski romanowski force-pushed the scala3doc/html-rendering branch from aa3926c to 73f46e8 Compare January 21, 2021 15:37
Copy link
Contributor

@BarkingBad BarkingBad left a comment

Choose a reason for hiding this comment

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

Good work!

import HTML._

// TODO be more clever about writting - make it much faster!
trait Writter(using ctx: DocContext) extends Locations:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intentional to have double t in Writter, or is it typo?

@romanowski romanowski force-pushed the scala3doc/html-rendering branch 4 times, most recently from 9a949c4 to 8b3e8a7 Compare January 26, 2021 21:31

extension[T] (member: Member)
def asLink: LinkToType = LinkToType(member.signature, member.dri, member.kind)
def deprecated: Option[Annotation] =
Copy link
Contributor

Choose a reason for hiding this comment

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

This will probably conflict with that PR #11216 Though I can resolve conflicts on my own

Copy link
Contributor

Choose a reason for hiding this comment

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

Note to myself, not CR

import HTML._

// TODO be more clever about writting - make it much faster!
trait Writer(using ctx: DocContext) extends Locations:
Copy link
Contributor

Choose a reason for hiding this comment

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

Still there is typo in filename :P

@@ -60,6 +60,8 @@ object HTML:
val h2 = Tag("h2")
val h3 = Tag("h3")
val h4 = Tag("h4")
val h5 = Tag("h4")
Copy link
Contributor

Choose a reason for hiding this comment

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

Tag("h5")

@@ -60,6 +60,8 @@ object HTML:
val h2 = Tag("h2")
val h3 = Tag("h3")
val h4 = Tag("h4")
val h5 = Tag("h4")
val h6 = Tag("h4")
Copy link
Contributor

Choose a reason for hiding this comment

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

Tag("h6")

Comment on lines +34 to +35
.membersBy(m => m.kind == Kind.Package || m.kind.isInstanceOf[Classlike])
.filter(m => m.origin == Origin.RegularlyDefined && m.inheritedFrom.isEmpty)
Copy link
Contributor

Choose a reason for hiding this comment

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

There was a function that decided whether to render page for member or not (Kind.Package and Kind.Classlike can be nested in e.g. Kind.Given). Without checking nested kinds we don't generate pages for all members that should have page.

It should look like

    def filterFunc(kind: Kind): Boolean = kind match {
      case Kind.Package => true
      case _ if kind.isInstanceOf[Classlike] => true
      case Kind.Given(inner, _, _) => filterFunc(inner)
      case Kind.EnumCase(inner) => filterFunc(inner)
      case _ => false
    }
    val childrenPages = member
      .membersBy(m => filterFunc(m.kind))
      .filter(m => m.origin == Origin.RegularlyDefined && m.inheritedFrom.isEmpty)

@romanowski romanowski force-pushed the scala3doc/html-rendering branch from 3239521 to 81f6a24 Compare January 29, 2021 14:30
@romanowski romanowski marked this pull request as ready for review January 30, 2021 12:56
@romanowski romanowski merged commit ab3bc41 into scala:master Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants