Opened 2 days ago

Closed 42 hours ago

#71295 closed defect (invalid)

go2port: does not pick up all dependencies

Reported by: graywolf-s1 Owned by: amake (Aaron Madlon-Kay)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: go2port

Description

Running go2port tool for go.opentelemetry.io/collector/cmd/builder gives the following:

$ go2port get go.opentelemetry.io/collector/cmd/builder v0.113.0
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           golang 1.0

go.setup            github.com/open-telemetry/opentelemetry-collector v0.113.0
categories
maintainers
license

description

long_description

go.package          go.opentelemetry.io/collector/cmd/builder

checksums           ${distname}${extract.suffix} \
                        rmd160  e351bd39c7b54736d389cf2f9edd2f133f87275f \
                        sha256  ad2d21ec051f1752c3d9d8acb4b9cfdd45397ea7c54d092482b20a458037fbfc \
                        size    2084426

go.vendors          gopkg.in/yaml.v3 \
                        lock    v3.0.1 \
                        rmd160  e85ac1368fb7f9ef945b7fd7bd608a1f0d261c12 \
                        sha256  f3ea6be3f405ec25f8799773355aba54f8831d11f5315a01155bdc69b92eca7b \
                        size    91208 \
                    gopkg.in/check.v1 \
                        lock    10cb98267c6c \
                        rmd160  465dcadb97762c84da6fb5f6d8352abe10445817 \
                        sha256  98ec7bd0dc7d4bcee7dcafe02efab29f14dc392f43b227e517beef064e9b6369 \
                        size    32368 \
                    google.golang.org/protobuf \
                        repo    github.com/protocolbuffers/protobuf-go \
                        lock    v1.35.1 \
                        rmd160  298e697a95bcfab24bee97581719e35cbd0e20e7 \
                        sha256  d7540ba1e087a1ecd238e4375c30ec9e21e057dcf206121d47da8eaa656580cd \
                        size    1522709 \
                    google.golang.org/grpc \
                        repo    github.com/grpc/grpc-go \
                        lock    v1.67.1 \
                        rmd160  12a6980c32b2548d70eabe1b32a57e494952321e \
                        sha256  e085703e7c290b02a5c74a3c8af9543aec1f13c59f5262513e83b13df4f41373 \
                        size    2206368 \
                    google.golang.org/genproto/googleapis/rpc \
                        repo    github.com/googleapis/go-genproto \
                        lock    fc7c04adadcd \
                        rmd160  ec64ad89f1f684076bc5580fde5d17226bd0cdf0 \
                        sha256  a795b16a7166cf14f49774e4be29f92f4872b21d5e1daa570e3b51f2b5f1586b \
                        size    5877641 \
                    golang.org/x/text \
                        lock    v0.18.0 \
                        rmd160  3e5a1cb8e141cf12ec79d1eab772321e81b07a60 \
                        sha256  6e7c97372c202ad9843ff3c45d8e945b2dfecb31ada4d3271e8022e54f833bb9 \
                        size    8972482 \
                    golang.org/x/sys \
                        lock    v0.26.0 \
                        rmd160  19987e0da1912ad52b2b04531f53e61b342592e6 \
                        sha256  4f47aa2c6f4fede87b4ff8bfb3da47c6b1ddc10bfdb2a5d85a97131f6a459313 \
                        size    1509195 \
                    golang.org/x/net \
                        lock    v0.28.0 \
                        rmd160  ff293c5c5c80c01ee1e994c91cfdc1c5fc7a5549 \
                        sha256  8bd844bca7746be0c4ba536164a6869427299ac0abfcd34a76b8ee1866918b5e \
                        size    1454672 \
                    go.uber.org/goleak \
                        repo    github.com/uber-go/goleak \
                        lock    v1.3.0 \
                        rmd160  aa886ccda5a90bd29394eb5cfdffd3ec4d7ce3cb \
                        sha256  d514163121ce220dd536aed595e5db68a469fd2622a93542f05eaeebc767ec3c \
                        size    20063 \
                    github.com/stretchr/testify \
                        lock    v1.9.0 \
                        rmd160  59147e117812fdf8270ec79e46a229c472caf08d \
                        sha256  e6fa4f530cad5bac94bf08af05ddd1f569aeac8db4017ab4330ab7fe2802a6a3 \
                        size    108716 \
                    github.com/rogpeppe/go-internal \
                        lock    v1.12.0 \
                        rmd160  ed748fa7713fcb28a8b0dd08c130eb4e61bf2a74 \
                        sha256  4e8a59559866e8e6a75f92ec826e6374c8d866da21ff8bb62b3eab3092214513 \
                        size    116901 \
                    github.com/pmezard/go-difflib \
                        lock    v1.0.0 \
                        rmd160  fc879bfbdef9e3ff50844def58404e2b5a613ab8 \
                        sha256  7cd492737641847266115f3060489a67f63581e521a8ec51efbc280c33fc991f \
                        size    11409 \
                    github.com/kr/text \
                        lock    v0.2.0 \
                        rmd160  48558c7e8ff67d510f83c66883907e95f4783163 \
                        sha256  2f2e21ac8a9d523e88cbba4039441defc4a66bfaa78811c900a88fcf28729c4c \
                        size    8702 \
                    github.com/kr/pretty \
                        lock    v0.3.1 \
                        rmd160  8c08579b4c56cdc958794e77afe3413e80aa67c3 \
                        sha256  7fcea475d6280976cf4a838e75d2b3a4105827316e588a80e49e8063d950c999 \
                        size    10232 \
                    github.com/google/go-cmp \
                        lock    v0.6.0 \
                        rmd160  2c9f5dab93f8a0895591466fe4a07c5dd9166ae2 \
                        sha256  0d550825fae514f8a947ab7e42fcb874f509d9cbfa3ad2711d7570a25f31571a \
                        size    104795 \
                    github.com/davecgh/go-spew \
                        lock    v1.1.1 \
                        rmd160  7c02883aa81f81aca14e13a27fdca9e7fbc136f7 \
                        sha256  e85d6afa83e64962e0d63dd4812971eccf2b9b5445eda93f46a4406f0c177d5f \
                        size    42171

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
}

However when you look at the go.mod ( https://github.com/open-telemetry/opentelemetry-collector/blob/main/cmd/builder/go.mod ), you will notice that some dependencies ( e.g. github.com/spf13/pflag ) are missing from the generated Portfile.

Change History (2)

comment:1 Changed 2 days ago by reneeotten (Renee Otten)

Owner: set to amake
Status: newassigned
Summary: go2port does not pick up all dependenciesgo2port: does not pick up all dependencies

comment:2 Changed 42 hours ago by amake (Aaron Madlon-Kay)

Resolution: invalid
Status: assignedclosed
  1. Please report non-packaging issues at the go2port GitHub project: https://github.com/amake/go2port/issues
  2. go.opentelemetry.io/collector/cmd/builder resolves to https://github.com/open-telemetry/opentelemetry-collector which means go2port is looking at https://github.com/open-telemetry/opentelemetry-collector/blob/main/go.sum, not https://github.com/open-telemetry/opentelemetry-collector/blob/main/cmd/builder/go.sum. This is a limitation of go2port's implementation, and is not something easily fixed (go module resolution logic is not, to my knowledge, made available in a way easily consumed from a tool like go2port, so go2port has no choice but to reimplement it on a best-effort basis. Not all scenarios are handled, and I am no longer actively working on it, so it seems unlikely that they will be in the future.)
Note: See TracTickets for help on using tickets.