Cork icon indicating copy to clipboard operation
Cork copied to clipboard

Problems with "DavidFoundation" when self-compiling

Open LowBudgetReference opened this issue 2 years ago • 3 comments

What were you trying to do?

I was trying to self-compile Cork.

What was the problem?

While trying to compile Cork, I have been encountering Build Failed errors either saying No such module 'DavidFoundation' or /Users/XXX/Cork/Cork/AppDelegate.swift:9:8 Compiled module was created by a different version of the compiler '5.10.0.13'; rebuild 'DavidFoundation' and try again: /Users/XXX/Library/Developer/Xcode/DerivedData/Cork-bmthvcbgupwnwbgqxbwtoemwugwk/Index.noindex/Build/Products/Debug/DavidFoundation.swiftmodule/x86_64-apple-macos.swiftmodule ("XXX" being my home folder's name since it's my real name).

I don't know what I am doing wrong since I have followed the steps in the README exactly. I have also tried to clean the build folder but to no avail.

I have noticed that DavidFoundation is listed in the .xcworkspace file but not the .xcproject one. I am assuming I am supposed to run Project -> Archive on the .xcproject file instead of the workspace one since that's how I remember the steps (and it's not specified which one to use in the README since both files are opened in Xcode by Tuist), but do correct me if I am wrong.

Error logs

None from Cork since it's the compiling process which I'm encountering an issue with, although here's my Terminal input and output:

Input:

rm -rf ~/Cork
cd
git clone https://github.com/buresdv/Cork.git
cd ~/Cork
mise use [email protected]
tuist install
tuist generate --no-binary-cache

Output:

Cloning into 'Cork'...
remote: Enumerating objects: 12447, done.
remote: Counting objects: 100% (2738/2738), done.
remote: Compressing objects: 100% (901/901), done.
remote: Total 12447 (delta 1950), reused 2384 (delta 1798), pack-reused 9709 (from 1)
Receiving objects: 100% (12447/12447), 10.98 MiB | 10.22 MiB/s, done.
Resolving deltas: 100% (7653/7653), done.
mise ~/Cork/.mise.toml tools: [email protected]
Resolving and fetching plugins.
Plugins resolved and fetched successfully.
Resolving and fetching dependencies.
Fetching https://github.com/SimplyDanny/SwiftLintPlugins from cache
Fetching https://github.com/buresdv/DavidFoundation from cache
Fetching https://github.com/sindresorhus/LaunchAtLogin-Modern from cache
Fetched https://github.com/SimplyDanny/SwiftLintPlugins from cache (0.78s)
Fetched https://github.com/sindresorhus/LaunchAtLogin-Modern from cache (0.78s)
Computing version for https://github.com/SimplyDanny/SwiftLintPlugins
Fetched https://github.com/buresdv/DavidFoundation from cache (0.85s)
Computed https://github.com/SimplyDanny/SwiftLintPlugins at 0.56.2 (1.43s)
Computing version for https://github.com/buresdv/DavidFoundation
Computed https://github.com/buresdv/DavidFoundation at 2.0.1 (1.92s)
Computing version for https://github.com/sindresorhus/LaunchAtLogin-Modern
Computed https://github.com/sindresorhus/LaunchAtLogin-Modern at 1.1.0 (1.30s)
Creating working copy for https://github.com/SimplyDanny/SwiftLintPlugins
Working copy of https://github.com/SimplyDanny/SwiftLintPlugins resolved at 0.56.2
Creating working copy for https://github.com/buresdv/DavidFoundation
Working copy of https://github.com/buresdv/DavidFoundation resolved at 2.0.1
Creating working copy for https://github.com/sindresorhus/LaunchAtLogin-Modern
Working copy of https://github.com/sindresorhus/LaunchAtLogin-Modern resolved at 1.1.0
Fetching binary artifact https://github.com/realm/SwiftLint/releases/download/0.56.2/SwiftLintBinary-macos.artifactbundle.zip from cache
Fetched https://github.com/realm/SwiftLint/releases/download/0.56.2/SwiftLintBinary-macos.artifactbundle.zip from cache (0.85s)
Loading and constructing the graph
It might take a while if the cache is empty
Generating workspace Cork.xcworkspace
Generating project Cork
Generating project LaunchAtLogin
Generating project DavidFoundation
Resolving package dependencies using xcodebuild
Project generated.
Total time taken: 9.399s

App Version

Nil, Xcode is 16.0 though

App Acquisition

Self-Compiled

Final checklist

  • [ ] This report is about the interface, and I included screenshots of the problem

LowBudgetReference avatar Oct 08 '24 04:10 LowBudgetReference

Hey, try opening the workspace. Tuist opens the workspace, and I've had problems if I opened the project instead. My quick selector has the workspace listed as well, so it should be the right thing to open: Snímek obrazovky 2024-10-09 v 13 07 00

buresdv avatar Oct 09 '24 11:10 buresdv

Huh, previously, when I opened the workspace file, it didn't allow me to edit stuff like the signing team and certificate and the build scheme, which was why I thought that I was supposed to use the project file instead. I'm not sure what changed, but strangely the workspace does work now so I can build the project without any errors. Thanks!

LowBudgetReference avatar Oct 11 '24 03:10 LowBudgetReference

No problem, glad to hear it works now

buresdv avatar Oct 11 '24 09:10 buresdv