Xcode: SPM package working but also showing "Workspace integrity error"

I have a SPM framework project that includes both Swift code and JSON file resources.

With a package file that looks like this:

let package = Package(
    name: "MyTestData",
    products: [
        .library(
            name: "MyTestData",
            targets: [
                "MyTestData",
            ]
        ),
    ],
    targets: [
        .target(
            name: "MyTestData",
            dependencies: [],
            path: "Sources",
            sources: ["ios"],
            resources: [
                .copy("payloads"),
                .copy("snippets"),
            ]
        ),
    ]
)

Now all the SPM packages resolve correctly and the code compiles and works, yet the Xcode workspace is showing errors like this:

Now payloads and snippets are not projects and I've tried all sorts of variations of path, sources, exclude, resource in my Package file and either I get the errors and everything works, or the errors disappear and the project doesn't work. I don't know what the issue is and there's nothing in the resolving or build logs.

Does anyone know what might be the problem here?

BUMP - Anyone else seen this? I've since found some people with the same error, but for what appears to be different reasons.

Xcode: SPM package working but also showing "Workspace integrity error"
 
 
Q