surprising behavior with -instrument and godep
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.5k
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
I am debugging a program that has a dependency on package `foo`, and I want to step into function calls in `foo`. So I run:
`$ godebug run -instrument=foo myProg.go`
godebug runs without complaint. Yet, to my surprise, I still can't step into `foo`. Why? Because I had forgotten that I was using godep. I would have been fine if I had instead run:
`$ godebug run -instrument=my/package/name/Godeps/_workspace/src/foo`
It would be nice if godebug caught this for me. At a minimum, it could have noticed that I didn't import package `foo` anywhere, and warned me that it was useless to pass that package in the `instrument` flag.
Alternatively, maybe we should get rid of the -instrument flag entirely. Having it sacrifices some usability for performance, but I don't understand the tradeoff very well. How much performance would we lose by instrumenting everything? Can we make that better? How often does the flag cause surprising behavior?
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 `godebug run` command and its `-instrument` handling, then reproduce the `godep` workspace case described in the issue. Done requires deciding whether to warn about packages that are not imported, remove the flag, or improve its behavior, with the performance tradeoff documented or tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, developer-experience, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100