-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
_PaginationView compilation with Xcode 12 beta #91
Comments
If you try to circumvent the error by using |
It would be great if you could fix this because I can't move to Xcode 12 until you do. I have encountered the same problem elsewhere with Xcode 11. It simply requires you to split the code up - for example, in this case, move the extensions into separate files. |
Were you able to successfully compile by splitting up the code yourself? |
Not with this issue, but I hit the issue with my own code using Combine (and that was using Xcode 11). I did split that code up and it compiled. I think Combine code must consume lots of resources when compiling. |
Have the same problem for .flatMap function. |
@writing-shed can you try removing and re-adding SwiftUIX? I suspect that Xcode is not updating to the latest |
So, it's been compiling fine on my MacBook Pro (15-inch, 2019) after #88, but I've still pushed some more type disambiguation with the latest commit. I've also moved some delegate code to @writing-shed @PKizzle @YasaminZamaniPro please test and confirm whether |
I reinstalled the package, did a clean build, but it still fails on the flatMap on lines 195 & 249 |
It works for me now. Thanks a lot! 🤗 |
I still get a compilation error |
@writing-shed |
@PKizzle can you create a gist for your checked out version of |
@vmanot Here is my gist: https://gist.github.com/PKizzle/786dec60a4d3681369a2a726fe287e11 |
@writing-shed Lines As you can see - this is the latest version of |
@PKizzle could you try building only SwiftUIX? I have a feeling that it traps when building it across modules. You do seem to have the latest version. |
Building only SwiftUIX works fine. However I am unable to use the PaginationView in my project. |
@PKizzle could you show me your call-site for |
This is weird. I just tried Xcode 12 again and I guess it must have reloaded SwiftUIX because the code has been updated, but now I too am getting abort trap 6. |
That's how I use the PaginationView
|
@PKizzle I'm pushing a commit with a potential fix in a few minutes, will ping once done here. |
Compiling SwiftUIX alone works fine |
This is the complete error stack dump:
|
@writing-shed @PKizzle just pushed another commit, please try it out and see if it fixes the |
@vmanot I am very sorry, it still does not compile 😕 |
I've send a bug report to Apple. Let's hope they'll fix it in an upcoming version of Xcode 12 / Swift 5.3 |
I deleted SwiftUIX and reinstalled but it still doesn't compile - same issue Abort trap 6. Sorry. |
@writing-shed @PKizzle please file bug reports as solving this (especially for a beta version of Xcode) is completely out of scope. Someone actually ran into a similar issue and got their solution through raising an Apple DTS - but you won't be able to do that here as it's a beta setup - the process is unfortunately going to be longer here. I'm marking this as That being said, please do post your radar numbers here so that we can get a bunch of people to dupe it and hopefully raise internal priority for Apple's compiler team. |
@PKizzle to answer your question - this may help, though it really shouldn't. But it's a complex compiler, so who knows ¯_(ツ)_/¯ |
The new feedback assistant does not allow for public sharing of the sent information. However if it somehow helps here's the feedback ID: FB7821652 @vmanot The Other Swift Flags sadly did not solve the issue |
@PKizzle can you try this:
|
@Brett-Best You're the best! This works! 🥳 |
I just updated the package 🙈 |
You don’t have to use AnyView here either, it just needs help figuring out the generic type. I wonder if the requirements of a function builder have changed. |
@YasaminZamaniPro No worries, it should all work fine. If you don't use a PaginationView at all, there's no issue. |
@YasaminZamaniPro hahaha, you can update without any issues - I've just added some |
@writing-shed does @Brett-Best's solution work for you? If so - then I'll close this ticket. |
Great stuff - it worked. I added the two AnyView components: struct PaginatedView: View {
} |
Closing this then, awesome work @Brett-Best! |
@vmanot I also encounter the compile time-exceed problem when i just import SwiftUIX(without using any module in it) in my project. I suspect that is the a lot of view extension have the same name with SwiftUI's modifier(like background, overlay modifier) confused compiler and slowed it down, finally cause time-exceed. But i can not screen these view extensions, so maybe i can not use this library in my project. |
When compiling with Xcode 12 beta the compiler runs out of steam compiling the Combine code on a 16Gb/256Gb MacBook Pro.
The error is on line 249 in
func pageViewController(
_ pageViewController: UIPageViewController,
viewControllerAfter viewController: UIViewController
) -> UIViewController?
The error says: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
The text was updated successfully, but these errors were encountered: