Problem in Xcode project to get all dependencies

Hi,

we have a problem with SPM where some of our dependencies after a fetch are greyed out:

Capture d’écran 2020-11-26 à 11.18.01

in some cases it will be Realm, in others Reachability, in others, an other one, the only thing we see is that it always seems to be around the same dependencies.

I was looking for insight in Mac OS console and stumble upon this message :

"IDEIndexing: Failed to get settings for PACKAGE:0YY1L6I0A34725P9BM4C0JV5WUJQH3FPZ.MODULE:Realm - build system did not respond"

after multiple test case, this message alway appear when our module is greyed out.

Funny thing is we can actually make it work and find the module if we force package update from Xcode (reset doesn't seem to do the trick), but we may have to do multiple updates to make it work.

Any idea on what could be happening ? we could workaround it on our personal environment, but for a CI, it isn't an option :/.

I hope some of you will have some insights for us ^^.

Have a great day.

3 Likes

@xwu, why was the tag changed wasn't my post in the right part of the forum ? :slightly_smiling_face:

The “Development” category is intended to discuss development of Swift. As you’re asking about something to do with using Swift Package Manager to develop your own project, not developing Swift Package Manager itself, the correct category is “Using Swift.”

ok seems logic :slightly_smiling_face: thank you.

if someone has an idea on where I could find logs that could help me debug that, that would be great, we are still stuck with this random happening bug. Sometimes, all dependencies will be retrieved without a problem, sometimes not :/

I'm sorry to ask again, but any bit of information would be great. We just want to understand what is going wrong when the dependencies are grayed out, because it seems that SPM has correctly fetched them.

Thank you in advance for your help :slightly_smiling_face:.

Haven't seen this issue before, would you mind creating a feedback report for this as this seems like an Xcode specific issue? Ideally with a reproducing project if possible.

Hi @NeoNacho

first of all I wish you all the best for this new year :slightly_smiling_face:.

Thank you for your answer, I will try to reproduce this in a project, but I feel that this won't be an easy task ^^.

one thing we found out today is that this problem seems less likely to appear when you are in a poor network condition. (I tested it with the network link conditionner with 8mbps for download and upload)

1 Like

ok so I've bee able to reproduce it on this example project :

Feedback id : FB8963254

Same problem here. Thank you for opening a feedback & creating a sample project !
Has anyone been able to investigate this yet ? Sadly it makes the switch to SPM impossible for now ...

I experience similar problems, and it seems related to one of or both of:

  1. Transitive dependencies
  2. Local (and possible Remote) Swift Packages that have overlapping dependencies with the main project's Swift Packages

I submitted this as a bug for firebase-ios-sdk, and one of their maintainers linked me to here.

My reproduction: https://github.com/jondwillis/FirebaseSPMBug

I have the same problems (also with previous versions of Xcode), mostly with the SwiftNIO package. It is because my project needs several packages that has SwiftNIO as a dependancy. In other projects without that double dependancy there is no problem.

It's totally annoying, I have to reset the package caches sometimes several times. Sometimes Xcode even crashes during loading.

I don't think, that opening a bug report about this issue would change anything, because I experienced, that Apple is not processing those bug reports (maybe just not mine because I am not a paying developer) :weary:

I may have stumbled onto a possible solution for this in Xcode 12.5 beta

Thank you for sharing. We'll see if the improved error messaging you mentioned there can apply to our issue as well :slight_smile:

That's not working for me, I tried the same with Xcode 12.5 beta. Where can I find the errors in Xcode? The report navigator doesn't show any errors.

Terms of Service

Privacy Policy

Cookie Policy