-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Avoid AnyView in the Counter code #168
Conversation
It's not needed there as `ViewBuilder` is smarter now.
@@ -45,15 +45,16 @@ struct Counter: View { | |||
let limit: Int | |||
|
|||
var body: some View { |
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.
I think you need @ViewBuilder
here
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.
Yes, I forgot to commit it 🤦♂️
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.
No longer needed as @ViewBuilder
is already on the body
declaration of the View
protocol.
Huh, so applying this change actually introduces crashes similar to #167. There definitely is some incompatibility between UPDATE: the runtime library is not related, this was an infinite recursion problem. |
…nter # Conflicts: # Sources/TokamakDOM/Shapes/Path.swift
It's not needed there as
ViewBuilder
is smarter now.The macOS SwiftUI SDK even with Xcode 12 still doesn't have the
@ViewBuilder
attribute on theView
protocol, so we have to build for iOS on CI to make the native buld pass.Resolves #167, which wasn't caused by protocol conformance problems, but by infinite recursion in the
_ConditionalContent
implementation ofbody
.Adds assorted formatting fixes, some are apparently caused by the newer
swiftformat
version.