Skip to content

File changes in symbolic linked directories are not reflected #1848

@ghost

Description

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Annotations, Type Checking, Completion, Diagnostics/Syntax Checking, Hover, Libraries

Expected Behaviour

When the content of a file within a directory which is a symbolic link changes, the language server should reflect the changes in, e.g., the code completion, hover, or diagnostics.

Actual Behaviour

The changes are not reflected, i.e., the code completion, hover information, or diagnostics as examples are not updated.

Reproduction steps

  1. Open a workspace which contains a directory which is a symbolic link.
    Example:

    Example

    The following content of common.lua is loaded:

    ---@param p1 string
    local function t1(p1)
    end
    
    ---@param p2 string
    local function t2(p2)
    end
    
    return t1;
  2. Change the content of common.lua with an external program without opening common.lua in VSCode, e.g., change the return to return t2;. For t in A.lua, t1 is still shown.

  3. Open common.lua in VSCode. Now, in A.lua, t2 is shown for t.
    Example

Alternative:

  1. Open the workspace with the symbolic linked directory and the target directory as a second workspace.
    Example:
    Alternative Example
  2. Open common.lua in the actual directory, and change something, e.g. the return to return t2;.
  3. t in A.lua still shows the information about t1. If common.lua in the symbolic linked directory is opened, t shows t2 on hover.

Additional Notes

I am not sure if this behavior is intended or a bug. So, feel free to close this issue if the behavior is intended.

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions