I ran into an interesting problem with Cute. Xcode/lldb would save code coverage info (default.profraw) to Cute's working directory, which would then cause Cute to barf when it found a file that was not the json it expected.
Why does lldb save to Cute's working directory? Well, the problem seems to be with the use of FileManger and changing the current working directory. Have a look at Apple's hilarious comments in the header:
/* Process working directory management. Despite the fact that these are instance methods on
NSFileManager, these methods report and change (respectively) the working directory for the
entire process. Developers are cautioned that doing so is fraught with peril.
*/
open var currentDirectoryPath: String { get }
open func changeCurrentDirectoryPath(_ path: String) -> Bool
Thanks Apple! So basically, we need to use absolute paths. I'm going to add this - but just thought i'd leave a note here in case anyone else runs into this issue.
That, my friend, is awesome. Best docstring I’ve read this week. I’ll take a look at this when I have a spare cycle or two this week. Thanks a bunch dude!
Hi Ryan,
I ran into an interesting problem with Cute. Xcode/lldb would save code coverage info (
default.profraw
) to Cute's working directory, which would then cause Cute to barf when it found a file that was not the json it expected.Why does lldb save to Cute's working directory? Well, the problem seems to be with the use of FileManger and changing the current working directory. Have a look at Apple's hilarious comments in the header:
Thanks Apple! So basically, we need to use absolute paths. I'm going to add this - but just thought i'd leave a note here in case anyone else runs into this issue.