Skip to content
This repository has been archived by the owner on Aug 21, 2022. It is now read-only.

Conditional compilation not working #139

Open
fpsqdb opened this issue Mar 7, 2019 · 2 comments
Open

Conditional compilation not working #139

fpsqdb opened this issue Mar 7, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@fpsqdb
Copy link

fpsqdb commented Mar 7, 2019

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

@saibing saibing self-assigned this Mar 9, 2019
@saibing saibing added the bug Something isn't working label Mar 9, 2019
@mbana
Copy link
Contributor

mbana commented Mar 30, 2019

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.

@saibing
Copy link
Owner

saibing commented Mar 31, 2019

@mbana

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants