symbols not found for OrderedCollections.OrderedSet #798
Replies: 14 comments 4 replies
-
@ferologics Bummer! Though this does sounds like an Apple bug, especially if changing your project structure fixes, doesn't it? Or do you think we could work around it somehow? If I understand correctly, it also sounds like you have a workaround in avoiding the framework and organizing things into SPM packages that can be directly embedded in your application. And I wonder if it could also be worked around by explicitly depending on Have you filed feedback with Apple? |
Beta Was this translation helpful? Give feedback.
-
I also believe it's an Apple bug, unless ofc there's some special SPM flag that can be added to the package to make it magically work, which again, seems unlikely.
Not a workaround (although possibly?), more of an observation that the issue comes up once
I already tired this and that the other day, but nether helped. Will try to do this again though, maybe something gives.
I submitted an Apple TSI earlier last week, only to get a (paraphrasing): "this isn't an issue with Apple / Xcode / SPM but with TCA, please resolve it with them, not our problem.". I asked them to reconsider this assessment, since to us it looks more on the Xcode / SPM side of things. What's strange is that you didn't encounter this issue with Isowords. If I'm not mistaken behind the scenes SPM resolves multiply-linked static frameworks into dynamic ones, which in theory should trigger this bug, unless it's an SPM dependency graph issue with "Xcode generated dynamic frameworks". |
Beta Was this translation helpful? Give feedback.
-
Can you follow up and ask them how this is an issue with TCA and how we may resolve it? If it's a matter of removing
We haven't done a release since introducing |
Beta Was this translation helpful? Give feedback.
-
@ferologics As a follow up, we were able to archive/submit isowords with the latest TCA with no errors, so it appears that if you leverage SPM totally and avoid frameworks you may be able to work around the problem |
Beta Was this translation helpful? Give feedback.
-
Going to add the "Apple Bug" label on this for now till we know it's something we can fix. |
Beta Was this translation helpful? Give feedback.
-
Thanks @stephencelis. I will update if/when they respond on the TSI email thread. In the meantime the
Unfortunately we can't rely on SPM solely because some of our dependencies don't support it (mixed Swift/Obj-C 🤷). Also, I also tried naively adding |
Beta Was this translation helpful? Give feedback.
-
I took another look at the console output of the failed clang command and broke it down a bit. After a bit of digging I found that inserting the path to
Basically, SPM does some magic inside the I believe this confirms the issue lies with Apple and how SPM / Xcode resolves the linked package products. I also think it is the SPM's responsibility to provide the full list of linked package products, and that we don't have any control over this particular TCA build step. I'll file a feedback for the issue as well as another TSI report as they don't seem to be responding to the previous one any longer. I'd appreciate any suggestions on how to file a better report just so it doesn't end up neglected like the previous TSI due to "the nature of the issue being with a 3rd party resource". 👐 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the update! You may also want to file a bug at bugs.swift.org if you want more public visibility into the problem/fix. |
Beta Was this translation helpful? Give feedback.
-
Small update on the old TSI:
In other news, to avoid being shunned in my next TSI due to "using a 3rd party tool", I reproduced the problem without TCA, using local packages. I boiled the issue down to the following dependency setup:
With that in place the I tried your suggestions in the new project but without any success. Maybe there's a simple workaround that I'm missing here, but for now it looks like we'll have to wait for Apple's response on the issue. |
Beta Was this translation helpful? Give feedback.
-
Cool, I'm going to convert this to a discussion since it seems to be an Apple bug till they can confirm otherwise. Please keep up posted there! |
Beta Was this translation helpful? Give feedback.
-
After the long winded wait, my feedback came through with a workaround:
I have ported this workaround over to our fork of TCA here and 🎉 it works! With that, I think that this case can be closed for the time being. I don't expect you to support this workaround, so until it is resolved with a more permanent solution we will simply rebase our change onto latest releases. |
Beta Was this translation helpful? Give feedback.
-
I'm getting the same error with TCA 0.28.1 and Xcode 13.1 ( |
Beta Was this translation helpful? Give feedback.
-
Looks like this affects test targets too. Not the ones auto created by defining them in the Package.swift, but where you create them in the Xcode project itself. |
Beta Was this translation helpful? Give feedback.
-
We ran into this building an SDK that we intend deliver as an XCFramework. We need to build dynamic libraries so that we can generate the correct XCFramework in the end. We have an example app colocated with the libraries that was importing the local (non-XCFramework) version, and hit this error when building the example app. To work around this, we just added a new |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
While bumping the version of the TCA package from
0.20.0
to0.25.1
we encountered an error with following console error:(find full log here and screenshot here)
For some reason the SPM linked dependency inside the TCA's
@_exported import IdentifiedCollections
fails to find "Swift Collections" package's OrderedCollections.OrderedSet symbols.To Reproduce
Expected behavior
A successful build.
Environment
0.25.1
FYI: the issue reproduces on latest macOS Monterey Xcode 13 beta.
Additional context
While attempting to reproduce in separate project we noticed that the issue with symbols comes up specifically in framework targets. Using the "IdentifiedArray" in the main app target builds successfully. We annotate this in the code with a comment above the "foo" variable.
Beta Was this translation helpful? Give feedback.
All reactions