Skip to content
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

Support rendering trees nested deeper than 64 levels. #41

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

zach-klippenstein
Copy link
Collaborator

This is required for Compose support, which can have trees that go far beyond
64 levels deep.

image

@@ -96,7 +97,7 @@ private fun StringBuilder.appendLinePrefix(
if (parentDepth > 0) {
append(' ')
}
val lastChild = lastChildMask and (1 shl parentDepth).toLong() != 0L
val lastChild = lastChildMask[parentDepth]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is pretty nice though, on the other hand.

Copy link
Contributor

Choose a reason for hiding this comment

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

😳 wow that's cool.

val tree = generateSequence(Node("leaf")) { child ->
Node("node", Node("leaf"), child)
}
.take(34)
.take(300)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ought to be enough for anybody…

@zach-klippenstein zach-klippenstein force-pushed the zachklipp/we-need-to-go-deeper branch from 60a21b0 to ecab4e6 Compare August 17, 2020 18:17
This is required for Compose support, which can have trees that go far beyond
64 levels deep.
@zach-klippenstein zach-klippenstein force-pushed the zachklipp/we-need-to-go-deeper branch from ecab4e6 to 225411a Compare August 17, 2020 18:25
@pyricau pyricau merged commit 8db19ab into main Aug 17, 2020
@pyricau pyricau deleted the zachklipp/we-need-to-go-deeper branch August 17, 2020 22:34
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.

2 participants