Xcode 8.0 Swift 3.0缓慢索引和构建 [英] Xcode 8.0 Swift 3.0 slow indexing and building

查看:102
本文介绍了Xcode 8.0 Swift 3.0缓慢索引和构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Xcode 8.0并将Swift 2.2转换为3.0(这个过程也耗费了很多时间,我只是让我的Mac一整夜都在运行)。我没有一个大项目(大约20个文件)。我也在使用 Pods 。索引以前的Xcode版本(< 8.0)工作得很快但现在,升级后,进度条卡在一个位置(我已经等了一个小时)。

I've installed Xcode 8.0 and converted Swift 2.2 to 3.0 (that process also took a lot of time, I just left my Mac running all night). I have not a big project (about 20 files). I am also using Pods. Indexing of previous Xcode version (< 8.0) worked fast but now, after upgrade, the progress bar is stuck on one position (I am already waiting for an hour).

我试过的东西对我没有帮助:

Things I've tried that didn't help me:


  • 清理 DerivedData 文件夹并重新启动Xcode

  • 清理项目并重新启动Xcode

  • 删除 Pods 目录< project> .xcworkspace 然后重新安装

  • 重新启动Mac

  • 尝试构建项目没有Pods

  • 重新安装Xcode

  • 在另一台克隆项目的Mac上尝试

  • Cleaned the DerivedData folder and restarted Xcode
  • Cleaned the project and restarted Xcode
  • Deleted Pods directory with <project>.xcworkspace and then installed again
  • Restarted Mac
  • Tried build project without Pods
  • Reinstalled Xcode
  • Tried on another Mac with cloned project

当开发人员花费数小时来解决这些荒谬的问题时,制作这样的软件版本真的不是很酷。这非常令人失望。
任何想法如何解决这个问题?

It is really not cool to make such releases of software when developers have to spend hours on solving such ridiculous problems. It is very disappointing. Any ideas how to fix this?

推荐答案

我通过评论所有文件然后删除评论来解决问题一。我发现问题仍然存在于此处所述的数组声明中。

I solved the problem by commenting all files and then removing comments one by one. I found that the problem is still in the array declaration as described here.

我有这样的代码而且项目没有索引:

I had code like this and project was not indexing:

class {
    var first: String!
    var second: String!
    var third: String!
    var fourth: String!
    var fifth: String!

    func abc() -> [String] {
        var array = [first, second, third, fourth, fifth]
    }
}

我已将其更改为此并且索引开始工作:

I've changed it to this and indexing started working:

class {
    var first: String!
    var second: String!
    var third: String!
    var fourth: String!
    var fifth: String!

    func abc() -> [String] {
        var array = [first]

        array.append(second)
        array.append(third)
        array.append(fourth)
        array.append(fifth)
    }
}

这篇关于Xcode 8.0 Swift 3.0缓慢索引和构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆