Skip to content

[SR-16080] SourceKit-LSP isn't aware of changes in other files #500

@adam-fowler

Description

@adam-fowler
Previous ID SR-16080
Radar None
Original Reporter @adam-fowler
Type Bug
Environment

swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)

Visual Studio Code: 1.65.2

vscode-swift: 0.4.1

Additional Detail from JIRA
Votes 0
Component/s SourceKit-LSP
Labels Bug
Assignee None
Priority Medium

md5: 00ca6d48e63005108f7d259bffdb1d9a

Issue Description:

Changes in one file are not always registered by another.

Repro:

  • Create a new project

  • Open VSCode

  • Create a file and add a struct called Test

  • Create a second file and add a function using a struct called Test2

  • Go back to first file and rename Test to Test2 such that your code will compile

  • The "cannot find type 'Test2' in scope" error still displays

  • Compile the project (notice it compiles fine)

  • The "cannot find type 'Test2' in scope" error still displays.

  • The only way to fix this is to edit the second file and re-type Test2

Expected:

Changes that fix an error in another file should register as fixing that error

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