[MacPorts] #61192: Lots of golang ports are downloading dependencies at build time

MacPorts noreply at macports.org
Sun Sep 27 13:30:40 UTC 2020


#61192: Lots of golang ports are downloading dependencies at build time
-------------------------------------------------+-------------------------
  Reporter:  amake                               |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  annie aws-vault certigo chezmoi     |
  cloudmonkey copilot croc elvish evans fzf      |
  gitqlite glow go-migrate golangci-lint gore    |
  gotop grpcurl hugo ipfs istioctl jenkins-cli   |
  k9s krew kubergrunt kustomize micro mole       |
  newreleases pulumi rclone scw staticcheck      |
  syncthing tektoncd-cli terragrunt trivy uni    |
  up webify wtfutil yq                           |
-------------------------------------------------+-------------------------

Comment (by amake):

 I've updated both `go2port` and the golang-1.0 portgroup to support auto-
 resolving custom domains (thanks to
 [[https://github.com/amake/go2port/pull/3|@mohd-akram]]). With this, **a
 lot** of the dependencies for k9s will be handled nicely automatically.
 However some will not:

 - Any deps "deeper" than the top level (like `github.com/Azure/go-
 autorest/autorest/adal`) don't work right. The root is also a dependency
 so you can delete those.
 - `google.golang.org/protobuf` is hosted at `go.googlesource.com`;
 tarballs from here [[https://github.com/google/gitiles/issues/84|are not
 deterministic]]. You can manually replace it with
 `github.com/protocolbuffers/protobuf-go`
 - The Microsoft dependencies reference `github.com/Microsoft`, but this
 has been renamed to `github.com/microsoft`. This needs to be manually
 resolved.

 Unfortunately after fixing all of that, I got build errors like:

 {{{
 # github.com/deislabs/oras/pkg/content
 ../../deislabs/oras/pkg/content/file.go:23:2: cannot use &FileStore
 literal (type *FileStore) as type ProvideIngester in assignment:
         *FileStore does not implement ProvideIngester (wrong type for
 ReaderAt method)
                 have ReaderAt(context.Context, "github.com/opencontainers
 /image-spec/specs-go/v1".Descriptor) (content.ReaderAt, error)
                 want ReaderAt(context.Context,
 "github.com/containerd/containerd/vendor/github.com/opencontainers/image-
 spec/specs-go/v1".Descriptor) (content.ReaderAt, error)
 }}}

 The errors seem to have something to do with incorrectly resolving full
 type names in the GOPATH. I don't know enough about go to fix it.

 I'll attach the complete portfile in case it helps.

-- 
Ticket URL: <https://trac.macports.org/ticket/61192#comment:34>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list