"no buildable Go source files"
Open
Nobody has claimed this yet.
bug
- Dominant language
- Go
- Stars
- 2.5k
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
Given this directory structure:
a $ tree
.
├── a.go
└── b
├── b.go
└── c
└── c.go
2 directories, 3 files
a $ cat a.go
package main
import (
"a/b"
"a/b/c"
)
func main() {
b.B()
c.C()
}
a $ cat b/b.go
package b
func B() {
println("B")
}
a $ cat b/c/c.go
package c
func C() {
_ = "breakpoint"
println("C")
}
Running godebug without -instrument gives a helpful warning:
a $ godebug run a.go
godebug run: Ignoring breakpoint at a/b/c/c.go:4 because package "c" has not been flagged for instrumentation. See 'godebug help run'.
B
C
But the -instrument flag does not work as expected:
$ godebug run -instrument a/b/c a.go
/var/folders/4l/d1lsmz5d4972rfkg1gvv8hmc0000gn/T/godebug895759339/a.go:4:2: no buildable Go source files in /var/folders/4l/d1lsmz5d4972rfkg1gvv8hmc0000gn/T/godebug895759339/src/a/b
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the sample package tree and reproduce godebug run -instrument a/b/c a.go, focusing on how the -instrument package path is resolved for imports from a.go. Compare this with the warning from running without -instrument; done means the command instruments a/b/c and runs the example without the "no buildable Go source files" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100