Skip to content

denols root_dir logic contains incorrect logic #4391

@bodograumann

Description

@bodograumann

Description

I haven't read all the previous issues regarding the denols config, but currently the logic contains redundant statements.
In particular "deno.lock" is contained both in project_root and in deno_lock_root. The condition for starting the LS i

    if
      (deno_lock_root and (not project_root or #deno_lock_root > #project_root))
      or (deno_root and (not project_root or #deno_root >= #project_root))
    then

However, when deno_lock_root is true, project_root will also always be true.
Similarly #deno_lock_root > #project_root can never be true, because if the lock file is closer than all other project files, it is still determining project_root.

Maybe "deno.lock" should be removed from root_markers?

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