Skip to content

[Embedded] Can't find any module when background indexing is turned on #2373

@kkebo

Description

@kkebo

Swift version

swift-DEVELOPMENT-SNAPSHOT-2025-11-25-a, swift-DEVELOPMENT-SNAPSHOT-2025-11-26-a

Platform

macOS 26.1

Editor

Visual Studio Code 1.106.2 with Swift extension, Vim 9.1 with vim-lsp

Description

Sourcekit-LSP has enabled backgroundIndexing by default on the main branch lately. However, since then, code completion has been broken.

Steps to Reproduce

Steps:

  1. Clone https://github.com/kkebo/embedded-lsp-mre
  2. Run cd embedded-lsp-mre
  3. Run swiftly install
  4. Open the current directory with VS Code or Vim
  5. Open Sources/Foo/Foo.swift

Expected behavior:

No errors are displayed on a editor.

Actual behavior:

The "No such module 'Bar'" error is displayed at import Bar.

However, it can be built with swift build -c release --triple aarch64-none-none-elf --toolset toolset.json successfully.

In addition, if you add "backgroundIndexing": false to .sourcekit-lsp/config.json, the error disappears and it works fine just like it did before.

Logging

sourcekit-lsp-diagnose-2025-11-28T21-17-23+09-00.zip

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