Here’s a (docker) image for you

We’re getting closer to a long vacation with intermittent Internet, so I’m going through all my developer tools, making sure that everything’s ready. Now that I know how to get VSCode to persist its downloaded stuff between runs in a given container (make sure there’s a .vscode-server/extensions directory in the container user’s $HOME), I wanted to see if I could get SwiftLint working as well.

It turns out that, if I spin up a container that just has the latest Swift in it, it’s unable to build SwiftLint from source. For one thing, the package file thinks it needs to unzip the already built and released Mac binary from a .zip file (okay, fine, apt-get install unzip) but then building for release involves compiling all the tests, which depend on the module XCTest, which is not present by default. (Huh?)

So okay, I’ve forked the SwiftLint repo and modified Package.swift (also so as not to statically link Swift into the binary — I’m gonna be using this in a container that has Swift, after all) and updated my development container recipe so that it’s got all the Swift tools I need. Hooray!

Published by pirateguillermo

I play the bagpipes. I program computers. I support my family in their various endeavors, and I enjoy my wonderful life.

Leave a ReplyCancel reply