My go snap refreshed recently, and since then ServiceWeaver (installed via go install
) fails to generate.
Running weaver generate
gives the following error:
$ weaver generate 1 ↵
2025/03/12 18:16:25 internal error: package "os" without types was imported from "customapp"
EDIT: I’ll also point out that if I remove the “os” import and any instances where it’s used in my code, the same error will be raised for another package.
I suspect service weaver installation doesn’t work well with go if it’s installed via snap, since I’ve been recommended by another dev to remove the snapped go and rather install the system version. I’d prefer to keep the snapped version. Anyone knows how to resolve this?