Closed xiegeo closed 1 year ago
@xiegeo it actually is expected behavior, that it tries implicitly to build the package. Here underneath https://github.com/1pkg/gopium/blob/406af8b07987b489d7138e86a2820bde34bd8b6e/typepkg/parser.go#L61 it uses this package https://pkg.go.dev/golang.org/x/tools/go/packages to infer the types sizes. AFAIK it's one of the most straightforward ways to calculate the actual sizes. The real question is why it uses C:\WINDOWS\go-build*
as its build folder.
@xiegeo please try to add -e "GOCACHE=C:\Users\xiege\AppData\Local\go-build"
to the cli parameters. So your full command will look like
C:\Users\...\go\bin\gopium.exe -p c:\Users\...\seed\dictionary -r ^Dictionary$ -c gc -a amd64 -l 64 -l 64 -l 64 -d -b -i 0 -w 8 -t 0 ast_go dictionary memory_pack -e "GOCACHE=C:\Users\xiege\AppData\Local\go-build"
I got it to work with this: -e "GOCACHE=C:\Users\xiege\AppData\Local\go-build,GOPATH=C:\Users\xiege\go,GOTMPDIR=C:\tmp"
@xiegeo, In the past I added this workaround https://github.com/1pkg/gopium/commit/970858171367fbf5dbd8ef4e1b6c201b5b06689a which clearly is not universal enough. This time I made a better fix in https://github.com/1pkg/gopium/pull/32 to propagate env defaults directly from go env
command. This should resolve this issue in general case, I believe. I merged it, and published as https://github.com/1pkg/gopium/releases/tag/v1.7.0. Please try it out.
Thanks, that fixed it.
Using the vs code extension on window produced the following error. Looks like it's trying to build code in the windows system directory, which it obviously should not.
log output