Skip to content

Test discovery partially fails with Swift 6.1 toolchain #2205

@SimplyDanny

Description

@SimplyDanny

Swift version

swift-6.1.2-RELEASE

Platform

macOS 15.5

Editor

Visual Studio Code 1.102.0 with Swift extension 2.6.1

Description

For a while, the Testing View in VS Code has only shown a few tests that could be executed. Running "all tests" really only executes the ones listed in the view -- not more.

This is a screenshot from the SwiftLint repository opened in VS Code:

Image

Unfortunately, I have no smaller example because I wasn't able to find the root cause.

However, I tried with a Swift 6.0.3 toolchain and that works after running swift build. Setting backgroundIndexing to false in the configuration with the Swift 6.1.2 toolchain also makes it work (after a manual build). So I assume background indexing, being the default since Swift 6.1, to be the root cause.

The observed behavior is the same on Linux, by the way.

Steps to Reproduce

Open SwiftLint in VS Code and observe the Testing View.

Logging

I can provide the diagnostic bundle, but the issue should be easily reproducible with the SwiftLint repository as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions