stadiamaps / maplibre-swiftui-dsl-playground

DSL and SwiftUI integration for MapLibre
BSD 3-Clause "New" or "Revised" License
20 stars 6 forks source link

Make SwiftUI live previews less crash-y #5

Open ianthetechie opened 1 year ago

ianthetechie commented 1 year ago

Right now it's almost trivial to get the SwiftUI live previews to crash. This is an unfortunate result of it trying to do exactly what you say with each keystroke. As the underlying C++ library will simply crash if it encounters most sorts of invalid states, it makes the editor extremely hard to use.

Off the top of my head, ideally we would be able to catch these and have the MapView instead return some sane-looking error view when in preview mode. We probably need a way to turn this off and/or a better way to surface crash details, but those can be addressed in separate issues. This issue is specifically about the consuming developer's experience.