Choose SDK version and/or specify SDK path in Nova extension

I’d like to build one of my Lua projects using a previous SDK version to avoid a bug that only occurs when I build it using the latest SDK (builds of this project using the previous SDK still work fine on the latest Playdate OS). I’m on MacOS 12.4 and I see that updating to the current SDK left the previous version installed under ~/Developer/PlaydateSDK-1.11.1, but I don’t see a way to get the Nova extension to build using that version. Even if I add export PLAYDATE_SDK_PATH=$HOME/Developer/PlaydateSDK-1.11.1 to my .zprofile, Nova still builds using 1.12.0.

I’d rather not have to uninstall the current SDK or force the use of the old one system-wide, because I want to work on other projects using the latest SDK and only use 1.11.1 for this one project for now. This makes the Nova build task configuration an ideal place for me to be able to select a version.

This isn’t a critical feature; for now I can manually run ~/Developer/PlaydateSDK-1.11.1/bin/pdc with the -sdkpath option, or manually create custom build/run/clean tasks in Nova. But it would be nice to be able to set this in the Playdate extension’s build task configuration UI. Without knowing how the extension works internally, it seems like a good idea to have an “SDK path” field alongside the existing source and output path fields in the UI.

Quick update: for anyone else who might want to do this, the quickest and easiest workaround I’ve found is to go into the project settings > Playdate Simulator task > build pipeline and add a script after the existing build task, consisting of something like:

~/Developer/PlaydateSDK-1.11.1/bin/pdc -sdkpath ~/Developer/PlaydateSDK-1.11.1 {path to your source} {path to your PDX output}

This is kind of a dumb workaround because it ends up building your project twice (I don’t see a way to prevent the default build task from running without also losing the default run/clean tasks and other benefits of the Playdate extension, unless there’s something I’m missing) but at least my project is small enough that it finishes instantly anyway.

I just rename the latest SDK folder from PlaydateSDK to PlaydateSDK-1.12.0

And the older one from PlaydateSDK-1.11.1 to PlaydateSDK

That's all.