saibing / bingo

Bingo is a Go language server that speaks Language Server Protocol.
MIT License
495 stars 25 forks source link

Conditional compilation not working #139

Open fpsqdb opened 5 years ago

fpsqdb commented 5 years ago

Here is the sample bingo-bug.zip

How to reproduce:

  1. open b_linux.go
  2. open b_windows.go
  3. edit b_windows.go and save (just trigger bingo server)

Will show error other declaration of test2

bingo_bug

mbana commented 5 years ago

I created an example that uses conditional complication which seems to work https://github.com/banaio/golanguageservertests/tree/conditional_compilation_issue_139. The branch name is conditional_compilation_issue_139. This package uses conditional compilation https://github.com/banaio/golanguageservertests/tree/conditional_compilation_issue_139/conditional_compilation_issue_139/fastwalk.

However, bingo itself seems to error on these files when I use VSCode:


Can you create a repository can you can clone, please. Not a zip file.

saibing commented 5 years ago

@mbana

Thank your advice, I hope we can fix it in gopls