bingo icon indicating copy to clipboard operation
bingo copied to clipboard

Conditional compilation not working

Open fpsqdb opened this issue 6 years ago • 2 comments

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

fpsqdb avatar Mar 07 '19 06:03 fpsqdb

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:

  • langserver/internal/cache/fsnotify_darwin.go:
    • other declaration of fsSubject
    • other declaration of notify.
  • langserver/internal/cache/fsnotify.go:
    • fsSubject redeclared in this block
    • method notify already declared for type fsSubject struct{observer Observer}
    • s.watched undefined (type *fsSubject has no field or method watched)
    • s.watched undefined (type *fsSubject has no field or method watched)

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

mbana avatar Mar 30 '19 19:03 mbana

@mbana

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

saibing avatar Mar 31 '19 05:03 saibing