Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dht package is broken #696

Closed
Gnyblast opened this issue Jul 23, 2024 · 4 comments
Closed

dht package is broken #696

Gnyblast opened this issue Jul 23, 2024 · 4 comments

Comments

@Gnyblast
Copy link

Gnyblast commented Jul 23, 2024

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 exposes device.go constants and types which just 3 items, as you can see in the image below.

image

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.

@deadprogram
Copy link
Member

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?

@Gnyblast
Copy link
Author

Yeah since addition of go tags to top //go:build tinygo, gopls stopped working.

@Gnyblast
Copy link
Author

Yeah problem was vscode-tinygo configs from the looks of it. Thanks.

@Gnyblast
Copy link
Author

Gnyblast commented Jul 24, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants