Hi go module experts,
I wrote this toy program:
which has a go.mod that list a small collection of dependencies (9 to be exact). The program doesn't do anything interesting except invoke debug.ReadBuildInfo and dump the result. When I run it on the playground, it produces this output:
main package path blob
main mod: {Path:blob Version:(devel) Sum: Replace:<nil>}
dep 0: &{Path:github.com/go-delve/delve Version:v1.7.2 Sum:h1:QTDJlgx9OwUVYVm7xthyf2XHKrZcTQu3wkRbovktidM= Replace:<nil>}
dep 1: &{Path:github.com/hashicorp/golang-lru Version:v0.5.4 Sum:h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= Replace:<nil>}
dep 2: &{Path:github.com/sirupsen/logrus Version:v1.6.0 Sum:h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= Replace:<nil>}
dep 3: &{Path:github.com/thanm/dwarf-check Version:v1.2.1-0.20210506143206-793c7855fe71 Sum:h1:OLUESsgTzZ+1ulnuCwmlzuuT/rx/XzlJGPXMCCfhDQU= Replace:<nil>}
dep 4: &{Path:github.com/thanm/dwdisplayfcn Version:v1.0.1 Sum:h1:HHLUsj8L3gqQedSNRiSLfHtXjZkuu3JgPU5bGL1EYmE= Replace:<nil>}
dep 5: &{Path:golang.org/x/arch Version:v0.0.0-20190927153633-4e8777c89be4 Sum:h1:QlVATYS7JBoZMVaf+cNjb90WD/beKVHnIxFKT4QaHVI= Replace:<nil>}
dep 6: &{Path:golang.org/x/sys Version:v0.0.0-20210514084401-e8d321eab015 Sum:h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E= Replace:<nil>}
Instead of seeing 9 deps, I only see 7. Here's the contents of the go.mod:
--
begin go.mod --
-- end go.mod --
I am puzzled as to why ReadBuildInfo doesn't seem to report a complete set of dependencies.
Is there something special about the missing deps that causes them to be skipped? Am I holding it wrong somehow, or is there a bug in my go.mod?
Any insights/help would be appreciated.
Thanks, Than