The big 2.0

That all-Swift version of Podcast Chapters I mentioned is out.

Hopefully everybody will notice some nice user-facing features, and nothing of the actual code changes.

I decided to splurge and jump to 2.0 for this, as much for getting magical thinking about the number out of the way as anything else.

Fun fact: the all-Swiftiness is a sort of half-lie. The non-Swift code is not actually used for anything, but I kept it around just to not make any last-minute radical changes. That turned out to be a good decision, because when I tried deleting the Objective-C code just now, I drowned in a wave of errors. Things like NSImage and others were missing all over the place.

The Objective-C code is exposed to Swift via a bridging header, and that also seems to expose all my Swift files to all the imports made in the Objective-C headers. It most likely makes total sense to anyone more up to speed on the whole language-bridging concept, but it caught me by total surprise. Luckily it was quick to isolate the cause, and the solution is of course to go back and add the missing imports to each file. It just takes a little while.

I am a little bit surprised a strict-ish language like Swift, running inside Apple's own environment, allows a thing like this to happen without any kind of warning. Again, it most likely makes all the sense in the world on a technical level, but removing an unused framework in a different language and getting a cascade of errors just feels strange. Swift basically let me write using deeply hidden imports for a very long time, and the effects take longer to repair the longer you let it go on.

Well, yes, I see how it makes sense now. The bridging header is set up for the whole project as a precompiled header, and I recall from my C++-adjacent days how precompiled headers count as added to all other files. And, of course, how that meant a whole lot of thoughtless work to undo when moving to an environment less friendly to the precompiled header concept itself.

Anyway, time to go clean that up nicely and make "all Swift" be true in all ways.

(Perhaps I will actually write about the version and its features the next time, who knows?)