#VSCode ignore workspace module error

16 messages · Page 1 of 1 (latest)

weak spire
#

I am making a cross-platform module that has both cgo and wasm support.
In the files that use cgo i add //+build cgo, and in the wasm files i add //+build wasm, but i still have to set a concrete build environment in the vscode settings, so it has to give me an error in some of the files, is there a way to fix this?

karmic tangle
#

tbh, not really, especially if you have multiple environments ytou want to support at the same time

#

i would ignore it

weak spire
karmic tangle
#

build constraint exclude files dont prevent autocomplete no

weak spire
#

oh, then its just a bit buggy, because i just had an issue where it said that a type from a cgo package did not exist

karmic tangle
#

cgo support in general is kinda meh

#

at least in gopls

#

its unfortunate

#

but its also hard

weak spire
#

oh well...

#

I'll leave this open for a while in case anyone has a solution

#

this is what i mean, the code works, but with the env set to wasm it does not find the type properly:

weak spire
left egret
#

yes