Goland Xgo shadow
shubham-dogra-s1 opened this issue · 4 comments
Hi, I am trying to use xgo with goland. Generated path using xgo shadow
and prepended the path to PATH
env variable for the test configuration but still goland using the default go installation.
/usr/local/go/bin/go tool test2json -t /Users/shubham.dogra/Library/Caches/JetBrains/GoLand2024.1/tmp/GoLand/___1TestHeathServer_1__http_request_error_in_internal_clients.test -test.v -test.paniconexit0 -test.run ^\QTestHeathCheckServer\E$/^\Q1:_http_request_error\E$
WARNING: xgo toolchain: failed to detect xgo version, consider install xgo: go install github.com/xhd2015/xgo/cmd/xgo@latest
note: this message can be turned off by setting XGO_CHECK_TOOLCHAIN_VERSION=false
I have verified that the first entry in path environment is the path generated by xgo shadow
PATH: /Users/shubham.dogra/.xgo/shadow:/usr/local/go/bin:/Users/shubham.dogra/go/bin
Am i missing something?
May be I am wrong but currently we only invoke xgo for [[ $cmd = build || $cmd = test || $cmd = run
but if you see the command generated by goland it is using /usr/local/go/bin/go tool
It seems Goland always uses absolute path /usr/local/go/bin/go
instead of go
, which bypasses the shadow path.
For this scenario, I think xgo shadow
needs to support absolute path replacement.
Let me test on my PC first.
hi @xhd2015 did you able to test this ?
It's difficult to make xgo work with goland correctly. Need to tinker another way.