One of our main packages is consistently failing with a vague error: malformed message when doing anything with swift test (i.e. list, --filter, --skip). It completes building/linking successfully, but fails immediately after.
I found an existing issue that seems somewhat similar to what we're experiencing, but our package doesn't contain LinuxMain.swift directly (some dependencies do contain a LinuxMain.swift).
I'm looking for a way to get more information about the error. Where is it coming from? What exactly is malformed?
I've seen this cryptic error before, which as you note, comes from the Swift compiler. Try running the tests in verbose mode by adding the -v flag, that will give you more info.
SwiftPM should be modified to never pass along that cryptic compiler error message alone. Right, @NeoNacho?
Try running the tests in verbose mode by adding the -v flag, that will give you more info.
We get some absurdly long data back, but nothing that looks particularly interesting, at least to my eyes. Guessing that we'll benefit a lot from a reduced package. I think we're pretty close to a minimally reproducing package (big thanks to my colleague @fibrechannelscsi). I'll either update the post or hijack that issue when we have a bit more info.
happens during test discovery maybe?
That would be my guess as well. I've been able to do swift build without issue, but anything swift test seems to trip up on this. I should also mention that we're reproducing via the 07-10 toolchain and on Linux, so I'll include a bit more detail there as well once we have it.