Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

GOOS file suffix ignored for compilation #2619

Closed
mreynolds opened this issue Jul 1, 2019 · 1 comment
Closed

GOOS file suffix ignored for compilation #2619

mreynolds opened this issue Jul 1, 2019 · 1 comment

Comments

@mreynolds
Copy link

This seems related to #1848.

For reference : https://blog.ralch.com/tutorial/golang-conditional-compilation/

Steps to Reproduce:

  1. Create a file mymodule.go
  2. Create a GOOS conditional compilation for current platform (say mymodule_linux.go)
package test

var string v = "test"
  1. Create a GOOS conditional compilation for a separate platform (say mymodule_darwin.go)
package test

var string v = "test"

VSCode-go treats both files as actively compile-able and, if code is repeated (say a var in the package scope) in both files, VSCode-go lists them as "redeclared" despite only one of them being compile-able on the current platform.

@ramya-rao-a
Copy link
Contributor

Thanks for reporting @mreynolds

The fix for #1848 will resolve this issue to
So, closing this in favor of #1848

@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants