Skip to content

nimlangserver reusing the wrong instance of nimsuggest #326

@arkanoid87

Description

@arkanoid87

preamble

simple project with 2 independent artifacts aaa and bbb

  • nimlangserver 1.10.2
  • vscode extension 1.6.0
  • no "nim.project"
  • no "nim.projectMapping"
.
├── config.nims
├── nimble.paths
├── src
│   ├── aaa.nim
│   └── bbb.nim
└── test_tooling.nimble

2 directories, 5 files

aaa.nim

proc main() =
  let aaa = 1u32
  echo aaa

main()

bbb.nim

proc main() =
  let bbb = 1.0f32
  echo bbb

main()

test_tooling.nimble

# Package

version = "0.1.0"
author = "Arkanoid87"
description = "A new awesome nimble package"
license = "Proprietary"
srcDir = "src"
bin = @["aaa", "bbb"]
binDir = "bin"

# Dependencies
requires "nim >= 2.2.2"

config.nims (autogenerated)

# begin Nimble config (version 2)
when withDir(thisDir(), system.fileExists("nimble.paths")):
  include "nimble.paths"
# end Nimble config

nimble.paths (autogenerated)

--noNimblePath

vscode opened with 2 tabs (split view) on aaa.nim and bbb.nim


case 1

bin = @["aaa", "bbb"]

Image
hints works on aaa.nim but not on bbb.nim because requests are sent to wrong root project:

DBG Reusing nimsuggest instance for            uri=file:///home/jack/nim/test_tooling/src/bbb.nim projectFile=/home/jack/nim/test_tooling/src/aaa.nim

case 2

bin = @["aaa"]

Image
hints work for bbb.nim but not on aaa.nim because requests are sent to wrong root project:

DBG Reusing nimsuggest instance for            uri=file:///home/jack/nim/test_tooling/src/aaa.nim projectFile=/home/jack/nim/test_tooling/src/bbb.nim

case 3

bin = @["bbb"]

Image
hints work for aaa.nim but not on bbb.nim because requests are sent to wrong root project:

DBG Reusing nimsuggest instance for            uri=file:///home/jack/nim/test_tooling/src/bbb.nim projectFile=/home/jack/nim/test_tooling/src/aaa.nim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions