The package manager seems to allow multiple copies of the package manifest to be keyed by the tools version:
$ ls Package*.swift
I couldn't find this documented anywhere -- in fact I can't remember where I first saw it used.
Certainly, it doesn't play well with the
swift package tools-version command.
Which behaviour is a bug?
The version-specific manifests were proposed in SE-0135 and documented in Usage.md
I clearly missed that one. Thanks!
This being said, there is no word on the intended interaction between version-specific manifest files and
swift package tools-version. It just doesn't do anything useful in that case. I rely on setting the tools version in my CI, so sadly it looks like I have to keep using a janky manifest with
#if swift conditional compilation. (Now with 3 branches!)