-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Migrate away from dokka: Part 1 #11183
Conversation
aa3926c
to
73f46e8
Compare
There was a problem hiding this 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: |
There was a problem hiding this comment.
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?
9a949c4
to
8b3e8a7
Compare
|
||
extension[T] (member: Member) | ||
def asLink: LinkToType = LinkToType(member.signature, member.dri, member.kind) | ||
def deprecated: Option[Annotation] = |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag("h6")
.membersBy(m => m.kind == Kind.Package || m.kind.isInstanceOf[Classlike]) | ||
.filter(m => m.origin == Origin.RegularlyDefined && m.inheritedFrom.isEmpty) |
There was a problem hiding this comment.
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)
This is huge and scarry commit
Remove rest of dokka usages
FIx some test failures
- Cache dri -> path transformations - compute graphs on demand not on initialization - change writter to writer
3239521
to
81f6a24
Compare
No description provided.