It seems that local packages in Xcode do not use the selected toolchain. Is there a workaround?
You can use xcrun and request the different toolchain:
xcrun --toolchain swift swift build
Or you can set the
TOOLCHAINS env variable to skip the
--toolchain swift arguments.
Edit: or did you mean within Xcode something isn't honoring it?
Thanks for your answer. Yes, I mean within Xcode. It seems to ignore some aspects of the latest toolchain (for example I cannot use the latests swift-tools-version in a package file). Other parts seem to be used correctly.
Packages in Xcode always use the libSwiftPM that comes bundled with that Xcode, the toolchain selection does not affect this. The selected toolchain will be used for the compiler and other related tools, though.
Thanks for your answer. I will post a change request for Xcode.