On Mon, Sep 14, 2026 at 8:36 AM Otto Kekäläinen <[email protected]> wrote:
> I ran into this same issue with Trufflehog:
>
> src/github.com/trufflesecurity/trufflehog/v3/main.go:13:2:
> github.com/couchbase/gocb/[email protected] requires
> github.com/couchbaselabs/gocaves/[email protected]:
> module lookup disabled by GOPROXY=off
> src/github.com/trufflesecurity/trufflehog/v3/main.go:14:2:
> github.com/couchbase/gocb/[email protected] requires
> github.com/couchbaselabs/gocaves/[email protected]:
> module lookup disabled by GOPROXY=off
> src/github.com/trufflesecurity/trufflehog/v3/main.go:15:2:
> github.com/couchbase/gocb/[email protected] requires
> github.com/couchbaselabs/gocaves/[email protected]:
> module lookup disabled by GOPROXY=off

When we got such issue. we may simple query it from Go Proxy / pkg.go.dev.
And then we will found `github.com/couchbase/gocb/v2` version `v2.12.5`.

And we have this legacy version in debian that doesn't ship the module
in correct path
golang-github-couchbase-gocb-dev | 2.6.3-1       | unstable   | all
golang-github-couchbase-gocb-dev:
/usr/share/gocode/src/github.com/couchbase/gocb/go.mod

The recommended fix:
Fork the repo, rename the package with updated XS-Go-Import-Path in
debian/control to ship the module with correct path with /v2 on the
filesystem for the new tooling to locate the module correctly in the
build environment.

> This github.com/couchbaselabs/gocaves/client is vendored inside two Go 
> packages:
>
> ii  golang-github-couchbase-gocb-dev     2.6.3-1      all
> Couchbase Go SDK (library)
> ii  golang-github-couchbase-gocbcore-dev 10.2.3-1     all          IO
> component of gocb (library)
>
> golang-github-couchbase-gocbcore-dev:
> /usr/share/gocode/src/github.com/couchbase/gocbcore/vendor/github.com/couchbaselabs/gocaves/client/go.mod
> golang-github-couchbase-gocb-dev:
> /usr/share/gocode/src/github.com/couchbase/gocb/vendor/github.com/couchbaselabs/gocaves/client/go.mod

Any specific reason to have the module duplicated as vendored module
inside two packages? Do these two packages use different versions of
this module that conflict with each other? Also, how do we plan to
track and maintain these vendored copies over time?

With module-aware builds, we package each module separately based on
its import path and place it on the filesystem. This allows Go
Workspaces to find and use the correct module during offline builds.
Because different versions have different import paths, version
conflicts are no longer an issue. This is why we rename source and
binary packages to match their import paths.

> Should I be able to use DH_GOLANG_MODULE_MAPPINGS to get past this? If
> so, what is the correct syntax?
>
> This did *not* work:
>
> DH_GOLANG_MODULE_MAPPINGS := \
>   
> github.com/couchbaselabs/gocaves/[email protected]:github.com/couchbaselabs/gocaves/client

No, DH_GOLANG_MODULE_MAPPINGS was an experimental feature in early
dh-golang version 1.66~exp+ for module support and currently does not
work as expected for this use case, and it will likely be removed or
deprecated in future toolchain updates.

Best regards,
-- 
-Andrew

Reply via email to