I’ve ran into a couple of issues which I thought I’d share as others might also run into them and hopefully they will be of use.
Thanks to subdigital for the help whilst I’m learning.
I had a couple of issues with some gems in Ruby since macOS comes shipped with a lesser version.
Reboot once completed.
Next when I went to complete the second video in the series I’d realised I hadn’t set up a great folder structure.
I had Katas then the code I’d been working with for the first FizzBuzz, this really needs it’s own folder, I moved this over then made a copy for the updates to guard, should really be using source control but I haven’t for now.
I tried running
bundle exec guard init bundle exec guard
But got an error when I tried updating any of the code
<unknown>:0: error: build had 1 command failures error: exit(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/AlexHedley/Documents/NSScreencast/Katas/FizzBuzz/.build/debug.yaml test Failed
I asked ben for help and he pointed me in the right direction, this wasn’t an issue with ruby but with swift.
and got a better error to work with
:0: error: PCH was compiled with module cache path '/Users/AlexHedley/Documents/NSScreencast/Katas/.build/debug/ModuleCache/Q3KKH3V7UU86', but the path is currently '/Users/AlexHedley/Documents/NSScreencast/Katas/FizzBuzz Updated/.build/debug/ModuleCache/Q3KKH3V7UU86'
Looking around I found that I needed to delete the .build folder
then I ran
swift build bundle exec guard init bundle exec guard
Command-Option-Shift-K to clean out the build folder. Even better, quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData
Would it be worth deleting the ModuleCache folder
Usually it can be resolved by holding down the Option key and choosing Product > Clean Build Folder…
Is there a way to do this for what we are using?