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

Building SwiftIcons on Xcode 10.2.1 takes forever #60

Open
Sompatbu opened this issue Jun 6, 2019 · 9 comments
Open

Building SwiftIcons on Xcode 10.2.1 takes forever #60

Sompatbu opened this issue Jun 6, 2019 · 9 comments

Comments

@Sompatbu
Copy link

Sompatbu commented Jun 6, 2019

I've update the Xcode into 10.2.1 after I've cleaned the project and build again. Xcode struck on building SwiftIcons like there's no ending to it. There is no error appears so far.

Xcode Version 10.2.1 (10E1001)
SwiftIcons version 2.3.2
Swift Language Version 4.2

@vitalii-tym
Copy link

I have the same problem while building production. Haven't compared it, but my subjective feeling is that building time wasn't that big before updating Xcode (and switching to Swift 5).

Screenshot 2019-06-06 14 25 18

Xcode Version 10.2.1 (10E1001)
SwiftIcons from my fork, which is 2.3.2 with a few fixes (https://github.com/vitalii-tym/SwiftIcons)
The whole project uses Swift 5

@davidho720
Copy link

I have the same problem

@Mau04
Copy link

Mau04 commented Jun 17, 2019

same for me

@dionc
Copy link

dionc commented Jun 17, 2019

In Xcode 10.2 and higher the i386 compiler is very slow at processing unicode string literals (eg "\u{1234}" and this is why it takes so long to compile SwiftIcons.swift. I found that I could fix it by removing i386 from the valid architectures in my project.

@vitalii-tym
Copy link

@dionc , good point! But in my project there is no i386 anywhere, as well as the library itself doesn't list i386 in its Valid Architectures. The only place where I can find i386 mentioned is in the Pods project, which is not used - the resolved values are taken from the lib's settings:

Screenshot 2019-06-19 12 52 57

@hammadzz
Copy link

hammadzz commented Jul 3, 2019

@vitalii-tym your fork doesn't seem to help. Maybe it is slightly faster. But I am still experiencing and extremely slow build purely because of SwiftIcons. The real problem is sadly compiler or configuration for it in XCode 10.

@vitalii-tym
Copy link

@hammadzz, I never said my fork worked better. It is as slow as the main repo.
However, the problem is only applicable to my Release configuration (which has optimization turned on). If you have troubles in your Debug config, which is a real pain I believe - make sure you have optimization turned off for it (Optimization Level: "-Onone")

@MinaFSedrak
Copy link

any update for production release with xCode 10.2 ?

@vitalii-tym
Copy link

vitalii-tym commented Oct 15, 2019

a quick workaround I currently use is to unlock the pod and remove all icons from the sets I don't use at all, leaving them almost empty. Like this:

public enum WeatherType: Int {
    public static var count: Int {
        return weatherIcons.count
    }

    public var text: String? {
        return weatherIcons[rawValue]
    }

    case alien
}

private let weatherIcons = ["\u{f075}"]

This speeds up build time dramatically.
Haven't had time to fix it properly in the lib itself yet.

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

No branches or pull requests

7 participants