This is a request to enhance SwiftPM's documentation regarding the use of testing-only libraries such as Swift Testing or XCTest in non-test targets of a package, for example in plain .target style targets as well as .library products.
Built-in testing libraries like Swift Testing and XCTest are only available for use in certain runtime contexts, and although any target in a SwiftPM package is able to import them, doing so in targets that are linked into “production” targets can cause clients to encounter issues if you’re not careful.
Myself and other code owners of Swift Testing are able to consult further on this documentation if needed.