Closed Gnyblast closed 4 months ago
Hello @Gnyblast I think the issue must be with the auto-complete in your editor, since the dht
package itself builds correctly in the CI.
See https://github.com/tinygo-org/drivers/blob/release/smoketest.sh#L101 and https://github.com/tinygo-org/drivers/actions/runs/9563791661/job/26363092847#step:8:378
Perhaps you need to open an issue in https://github.com/tinygo-org/vscode-tinygo?
Yeah since addition of go tags to top //go:build tinygo
, gopls stopped working.
Yeah problem was vscode-tinygo configs from the looks of it. Thanks.
Sorry to coming back to this again but let me explain. I'm writing a program for especially for Raspberry pi (not pico) models. And I'm not using tinygo because it's obviosuly running an OS not a microcontroller. I just wanted to take advantage of your drivers
module to create a factory for input devices, communicate and fetch data from them. But obviously since v0.20.0
the addition of //go:build tinygo
prevents default gopls
on vscode to resolve the code correctly also the go compiler as well. This go tag is added because the code is not compatible with main go binary for compilation and being used as library or just to make things more integrated on tinygo side?
Since release v0.20.0 when
device.go
introduced to the package, the methods are gone for dht package like:dht.New()
. dht package now only exposesdevice.go
constants and types which just 3 items, as you can see in the image below.v0.19.0 seem to not having this issue though.
I don't think I'm doing some miss-implementation because your example is also using that way which is not exist anymore.
I see when I compare this
dht
package tagged with//go:build tinygo
any reason doing that? Gopls now does not support it.