I rarely use playgrounds and was planning to do a training on Swift basics for some co-workers.
I'm on macOS 10.14.1 with Xcode 10.1 (10B61)
Playgrounds though are highly unstable in that they will crash or complain that something isn't compilable when in fact it is when dropped into a Swift project. For the latter situation, here's what I mean:
If your playground has an obvious error, it is called out with the inlined error bar. For example:
let x = 3
x += 5 // ERROR: Left side of mutating operator isn't mutable: 'x' is a 'let' contstant
And, at the top of the playground window, you see a warning of "The playground could not continue running because the playground source did not compile successfully".
Problem though is I'm getting that warning when the code is valid. Not all the time though. At which point I close and re-open the playground and the issue sometimes goes away or persists. Sometimes I re-write the small code snippet and then it behaves.
I'm thus finding it difficult to narrow down the cause, but it seems like playgrounds are ending up in a bad state; thinking the code isn't complable and then producing that warning or crashing.
I have tried both run modes (Automatically Run and Manually Run) and get the same issues either way.