Skip to content

main branch is broken with GO111MODULE=off (using vendoring/gopath) #6016

@thaJeztah

Description

@thaJeztah

Description

The main branch is broken when trying to build using the vendor directory (with go modules disabled)

Steps to reproduce the issue

  1. Clone the repository in GOPATH (/src/go/github.com/containerd/containerd)
  2. Build with GO111MODULE=off (to enforce the vendor directory to be used)

Using GO111MODULE=auto seems to work as a workaround (we're using off to allow using the same scripts for both the 1.4 and 1.5 branches)

Describe the results you received and expected

GO111MODULE=off make -C /go/src/github.com/containerd/containerd --no-print-directory DESTDIR=/root/containerd PREFIX= VERSION=20210916.065010~7ddf5e5 REVISION=7ddf5e52ba738e868b70807797c79c8e54da3497 PACKAGE=containerd.io binaries install

An error is produced:

vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/connection/connection.go:33:2:
found import comments "go.opentelemetry.io/otel/exporters/otlp/internal/otlpconfig" (options.go)
and "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig" (optiontypes.go)
in /go/src/github.com/containerd/containerd/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig

And indeed; there's two files in the same package that have an //import comment to force them being imported:

# options.go:
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/internal/otlpconfig"

# optiontypes.go
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig"

package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/internal/otlpconfig"

package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig"

What version of containerd are you using?

main

Any other relevant information

No response

Show configuration if it is related to CRI plugin.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions