Delve: can't load package: package .: no buildable Go source files in

Created on 19 May 2017  路  4Comments  路  Source: go-delve/delve

Please answer the following before submitting your issue:
debug error :can't load package: package .: no buildable Go source files in /Users/wxq/go
why?
Note: Please include any substantial examples (debug session output,
stacktraces, etc) as linked gists.

  1. What version of Delve are you using (dlv version)?
    dlv version
    Delve Debugger
    Version: 1.0.0-rc.1
  2. What version of Go are you using? (go version)?
    go version go1.8.1 darwin/amd64
  3. What operating system and processor architecture are you using?
    Mac os 10.12.5
  4. What did you do?
    visual studio code to develop golang project
  5. What did you expect to see?
  6. What did you see instead?

All 4 comments

Presumably because there are no buildable go source files in /Users/wxq/go

same problem here. I think it happens because the variable ${fileDirName} points to .vscode folder. It needs to point to local folder. It's a wrong behavior, ok?

can't load package: package filetraining/.vscode: no buildable Go source files in C:\goworkspace\src\filetraining.vscode

the blame is all of vscode.

I encounter this issue just when trying to issue "go get github.com/derekparker/delve" on MS VSCode on Mac OS X Sierra 10.12.5,

@aarzilli something similar here, weird issue:

  • macOS 10.12.6
  • go version go1.9.2 darwin/amd64
  • dlv 1.0.0-rc.1
  • there are go buildable sources:
$> echo $GOPATH
/Users/glerchundi/.go
$> ls -l $GOPATH/src/github.com/glerchundi/grpc-boomerang/cmd/websocket-server-grpc-client
total 8
-rw-r--r--  1 glerchundi  staff  3115 Nov 15 11:42 main.go
  • but dlv complains saying there aren't:
$> /usr/local/bin/dlv debug github.com/glerchundi/grpc-boomerang/cmd/websocket-server-grpc-client --headless=true --listen=127.0.0.1:2345 --log=true --
can't load package: package github.com/glerchundi/grpc-boomerang/cmd/websocket-server-grpc-client: build constraints exclude all Go files in /Users/glerchundi/.go/src/github.com/glerchundi/grpc-boomerang/cmd/websocket-server-grpc-client
exit status 1

UPDATE: it was my fault. There was a // build: +ignore header in there, another one bitten by copy&pasting monster.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wusendong picture wusendong  路  5Comments

delaneyj picture delaneyj  路  4Comments

derekparker picture derekparker  路  6Comments

devtoro picture devtoro  路  6Comments

ankur0101 picture ankur0101  路  4Comments