Open helje5 opened 3 weeks ago
The device I configured is a "Pixel 6 API 35" in "Android Studio Koala | 2024.1.1 Patch 2", in case that might be problematic.
GRADLE> > Task :skipstone:SkipUI:mergeDebugNativeLibs NO-SOURCE
GRADLE> > Task :skipstone:SkipUI:copyDebugJniLibsProjectOnly UP-TO-DATE
GRADLE> > Task :skipstone:SkipCows:mergeDebugJniLibFolders UP-TO-DATE
GRADLE> > Task :skipstone:SkipCows:mergeDebugNativeLibs NO-SOURCE
GRADLE> > Task :skipstone:SkipCows:copyDebugJniLibsProjectOnly UP-TO-DATE
GRADLE> > Task :app:mergeDebugNativeLibs NO-SOURCE
GRADLE> > Task :app:stripDebugDebugSymbols NO-SOURCE
GRADLE>
GRADLE> > Task :skipstone:SkipCows:compileDebugKotlin FAILED
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:10:13 Unresolved reference 'lib'.
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:12:13 Unresolved reference 'ui'.
/private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:10:13: error: Unresolved reference 'lib'.
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:13:13 Unresolved reference 'foundation'.
/Users/helge/projects/skip-cows/Sources/SkipCows/ContentView.swift:1:1: error: Unresolved reference 'ui'.
/private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:12:13: error: Unresolved reference 'ui'.
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:14:13 Unresolved reference 'model'.
/private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:13:13: error: Unresolved reference 'foundation'.
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:16:20 Unresolved reference 'View'.
/private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:14:13: error: Unresolved reference 'model'.
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:18:22 Unresolved reference 'wrappedValue'.
/Users/helge/projects/skip-cows/Sources/SkipCows/ContentView.swift:3:1: error: Unresolved reference 'View'.
/private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:16:20: error: Unresolved reference 'View'.
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:20:18 Unresolved reference 'wrappedValue'.
/Users/helge/projects/skip-cows/Sources/SkipCows/ContentView.swift:4:28: error: Unresolved reference 'wrappedValue'.
Very curious. That works for me – and since you aren't yet using the dependency in your target, it shouldn't be affecting the plugin in any way. Nothing in ContentView.swift
is changed from the default template?
Does the same error occur if you do File
/Packages
/Reset Package Caches
and then do a clean rebuild? Xcode 15.4 sometimes gets snarled up when packages with plugins are changed (although 16b5+ was supposed to have fixed this).
Reset Package Caches
seems to have fixed it!
Now when I actually add the dependencies, it still doesn't work though:
GRADLE> > Task :skipstone:SkipCows:mergeDebugNativeLibs NO-SOURCE
GRADLE> > Task :skipstone:SkipCows:copyDebugJniLibsProjectOnly UP-TO-DATE
GRADLE> > Task :app:mergeDebugNativeLibs NO-SOURCE
GRADLE> > Task :app:stripDebugDebugSymbols NO-SOURCE
GRADLE>
GRADLE> > Task :skipstone:SkipCows:compileDebugKotlin FAILED
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:10:13 Unresolved reference 'lib'.
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:12:13 Unresolved reference 'ui'.
/private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:10:13: error: Unresolved reference 'lib'.
GRADLE> e: file:///private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:13:13 Unresolved reference 'foundation'.
/Users/helge/projects/skip-cows/Sources/SkipCows/ContentView.swift:1:1: error: Unresolved reference 'ui'.
/private/tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/SourcePackages/plugins/skip-cows.output/SkipCows/skipstone/SkipCows/src/main/kotlin/skip/cows/ContentView.kt:12:13: error: Unresolved reference 'ui'.
Did another pkg-reset and rebuild, but still doesn't go through:
GRADLE> > Task :skipstone:cows:copyDebugJniLibsProjectOnly UP-TO-DATE
GRADLE> > Task :skipstone:SkipFoundation:mergeDebugJniLibFolders UP-TO-DATE
GRADLE> > Task :skipstone:SkipFoundation:mergeDebugNativeLibs NO-SOURCE
GRADLE> > Task :skipstone:SkipFoundation:copyDebugJniLibsProjectOnly UP-TO-DATE
GRADLE> > TError: /tmp/DerivedData/SkipCows-bwcsyckojaojqggpnyxjyblxlksz/Build/Intermediates.noindex/SkipCows.build/Debug-iphonesimulator/SkipCows.build/skip-gradle.log.txt:260:0: error: The gradle command failed. Review the log for details and consult https://skip.tools/docs/faq for common solutions. Command: gradle -p ../Android launchDebug
ask :skipstone:SkipModel:mergeDebugJniLibFolders UP-TO-DATE
...
GRADLE> > Task :app:writeDebugSigningConfigVersions UP-TO-DATE
GRADLE> > Task :app:mergeLibDexDebug
GRADLE>
GRADLE> > Task :app:compileDebugKotlin FAILED
GRADLE> e: file:///Users/helge/projects/skip-cows/Android/app/src/main/kotlin/skip/cows/Main.kt:3:13 Unresolved reference 'lib'.
GRADLE> e: file:///Users/helge/projects/skip-cows/Android/app/src/main/kotlin/skip/cows/Main.kt:4:13 Unresolved reference 'model'.
/Users/helge/projects/skip-cows/Android/app/src/main/kotlin/skip/cows/Main.kt:3:13: error: Unresolved reference 'lib'.
GRADLE> e: file:///Users/helge/projects/skip-cows/Android/app/src/main/kotlin/skip/cows/Main.kt:5:13 Unresolved reference 'foundation'.
/Users/helge/projects/skip-cows/Android/app/src/main/kotlin/skip/cows/Main.kt:4:13: error: Unresolved reference 'model'.
GRADLE> e: file:///Users/helge/projects/skip-cows/Android/app/src/main/kotlin/skip/cows/Main.kt:6:13 Unresolved reference 'ui'.
/Users/helge/projects/skip-cows/Android/app/src/main/kotlin/skip/cows/Main.kt:5:13: error: Unresolved reference 'foundation'.
I have my DerivedData in /tmp could that have sth to do with it?
It shouldn't matter where DerivedData
is, and since it worked for you in the past, it shouldn't be making any difference now.
But to be on the safe side, can you try deleting your DerivedData and re-starting Xcode?
Just tried the whole thing at my home machine (Xcode 16b5, installing all the stuff for the first time), template projects builds and runs, but as soon as I do
.package(url: "https://github.com/AlwaysRightInstitute/cows.git",
branch: "skip")
Things error out. Reset Package Caches fixes that, and it builds. But when I then actually add the dep to the app:
.target(name: "SkipCows", dependencies: [.product(name: "SkipUI", package: "skip-ui"),.product(name: "cows", package: "cows")], resources: [.process("Resources")], plugins: [.plugin(name: "skipstone", package: "skip")]),
It still fails.
Doesn't seem machine specific but a general issue.
Hmm. Very odd. I am able to add that dependency and run a project that uses it.
If you try rebuilding a few times, is the (initial) error the same each time?
Not sure, but it essentially doesn't work for me. I deleted Derived Data and restarted Xcode sufficient times, I think it is an actual issue with the Skip build process.
FWIW, adding the dependency works fine on my machine as well
Yup, I think the question is why your setup is different to mine, making things fail. I just followed the getting started instructions, both w/ the same result 🤷♀️ (both Mac Mini's, M1 and M2, w/ 14.6.1 (23G93)
Can you send us a failed build log and maybe a zipped version of your project?
All of our own libraries use SwiftPM of course, and there's nothing special about them compared to your cows library. And of course our own libraries are working for all our users, and your cow library is also working for us... so it's very odd that this isn't working for you. We'd love to get to the bottom of it.
Pinging once more about this, @helje5. We'd love to get you up and running. Or, at the very least, figure out what is causing the difference between your experience and ours with adding the external dependency…
As per the discussion in Slack.
I create the app in Xcode (tried both 15.4 and 16b3):
I can build an run the thing in Xcode and it also shows up in the simulator. I then go to
SkipCows/SkipCows/Package.swift
in Xcode and add the cows dependency. This alone makes the build fail w/ 300+ errors.Package.swift: