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

stopAndWait hangs when -whole-module-optimization is turned on #31

Open
dominicfreeston opened this issue May 3, 2017 · 2 comments
Open

Comments

@dominicfreeston
Copy link

This can be confirmed by turning on Swift Whole Module Optimisation for the Debug Configuration in the Build Settings, and running the tests.

I realise this is quite likely to be a Swift compiler bug, but having it recorded here might save someone some valuable time, and maybe there's a way to avoid this I'm not aware of.

Some context

We setup Embassy/Ambassador as the server for our UI tests and everything was working fine until it was running on our CI, where it would just hand endlessly. I eventually realised that this was because we were using a different Configuration and Cocoapods creates new Configurations to match any you added, but the pods themselves have settings that match those of their default Release config, with Whole Module Optimisation turned on.

A 'solution'

We've worked around the issue using the following Cocoapods post_install script (with inspiration taken from this old Cocoapods thread):

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'Embassy'
      target.build_configurations.each do |config|
          config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
      end
    end
  end
end
@fangpenlin
Copy link
Contributor

@dominicfreeston

Hi Dominic,

thanks for the report, that's a very interesting finding. I will look into that when I have time. I saw there is another issue open for similar hanging issue #30, not sure is that the same one, but will look into that later altogether.

@iNima
Copy link

iNima commented May 8, 2018

@dominicfreeston @fangpenlin
Thanks for the workaround solution but what can we do when we are using Carthage?

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

3 participants