Since this is a mailing list, editing the post wouldn't help you much
anyway. As soon as you make the original post it gets sent to everyone's
email as-is. Best just to do exactly what you did and follow up with more
info.

On Mon, Apr 8, 2019 at 7:29 AM Vladislav Mitov <vladislav.mi...@gmail.com>
wrote:

> Since when I can't edit posts? Strange.
>
> The debug info was from before I pushed the first service to gitlab. Here
> is the correct one:
>
> WORK=/tmp/go-build828045533
>> Fetching
>> https://gitlab.company.com/vladislav.mitov/service/pkg/client?go-get=1
>> Parsing meta tags from
>> https://gitlab.company.com/vladislav.mitov/service/pkg/client?go-get=1
>> (status code 200)
>> get "gitlab.company.com/vladislav.mitov/service/pkg/client": found meta
>> tag get.metaImport{Prefix:"
>> gitlab.company.com/vladislav.mitov/service/pkg/client", VCS:"git",
>> RepoRoot:"https://gitlab.company.com/vladislav.mitov/service/pkg/client"}
>> at https://gitlab.company.com/vladislav.mitov/service/pkg/client?go-get=1
>> mkdir -p /home/master/Workspace/go/pkg/mod/cache/vcs # git2
>> https://gitlab.company.com/vladislav.mitov/service/pkg/client
>> # lock
>> /home/master/Workspace/go/pkg/mod/cache/vcs/ff338c7e0e1ae4b0396cc581329d58d26a1e39c55116c29c97948a4a64c797a9.lock#
>> /home/master/Workspace/go/pkg/mod/cache/vcs/ff338c7e0e1ae4b0396cc581329d58d26a1e39c55116c29c97948a4a64c797a9
>> for git2 https://gitlab.company.com/vladislav.mitov/service/pkg/client
>> cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/ff338c7e0e1ae4b0396cc581329d58d26a1e39c55116c29c97948a4a64c797a9;
>> git ls-remote -q
>> https://gitlab.company.com/vladislav.mitov/service/pkg/client
>> 0.599s # cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/ff338c7e0e1ae4b0396cc581329d58d26a1e39c55116c29c97948a4a64c797a9;
>> git ls-remote -q
>> https://gitlab.company.com/vladislav.mitov/service/pkg/client
>> Fetching https://gitlab.company.com/vladislav.mitov/service/pkg?go-get=1
>> Parsing meta tags from
>> https://gitlab.company.com/vladislav.mitov/service/pkg?go-get=1 (status
>> code 200)
>> get "gitlab.company.com/vladislav.mitov/service/pkg": found meta tag
>> get.metaImport{Prefix:"gitlab.company.com/vladislav.mitov/service/pkg",
>> VCS:"git", RepoRoot:"
>> https://gitlab.company.com/vladislav.mitov/service/pkg"} at
>> https://gitlab.company.com/vladislav.mitov/service/pkg?go-get=1
>> mkdir -p /home/master/Workspace/go/pkg/mod/cache/vcs # git2
>> https://gitlab.company.com/vladislav.mitov/service/pkg
>> # lock
>> /home/master/Workspace/go/pkg/mod/cache/vcs/09f143e37d8fc82802c4ce59d3fec02d19347221fe46af231bfa83e1bacd4f7a.lock#
>> /home/master/Workspace/go/pkg/mod/cache/vcs/09f143e37d8fc82802c4ce59d3fec02d19347221fe46af231bfa83e1bacd4f7a
>> for git2 https://gitlab.company.com/vladislav.mitov/service/pkg
>> cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/09f143e37d8fc82802c4ce59d3fec02d19347221fe46af231bfa83e1bacd4f7a;
>> git ls-remote -q https://gitlab.company.com/vladislav.mitov/service/pkg
>> 0.643s # cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/09f143e37d8fc82802c4ce59d3fec02d19347221fe46af231bfa83e1bacd4f7a;
>> git ls-remote -q https://gitlab.company.com/vladislav.mitov/service/pkg
>> Fetching https://gitlab.company.com/vladislav.mitov/service?go-get=1
>> Parsing meta tags from
>> https://gitlab.company.com/vladislav.mitov/service?go-get=1 (status code
>> 200)
>> get "gitlab.company.com/vladislav.mitov/service": found meta tag
>> get.metaImport{Prefix:"gitlab.company.com/vladislav.mitov/service",
>> VCS:"git", RepoRoot:"https://gitlab.company.com/vladislav.mitov/service"}
>> at https://gitlab.company.com/vladislav.mitov/service?go-get=1
>> mkdir -p /home/master/Workspace/go/pkg/mod/cache/vcs # git2
>> https://gitlab.company.com/vladislav.mitov/service
>> # lock
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4.lock#
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4
>> for git2 https://gitlab.company.com/vladislav.mitov/service
>> cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>> git ls-remote -q https://gitlab.company.com/vladislav.mitov/service
>> 0.707s # cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>> git ls-remote -q https://gitlab.company.com/vladislav.mitov/service
>> go: finding gitlab.company.com/vladislav.mitov/service latest
>> cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>> git -c log.showsignature=false log -n1 '--format=format:%H %ct %D'
>> 378a88163ba50ea08f9ce738c442403ed4826a0e
>> 0.007s # cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>> git -c log.showsignature=false log -n1 '--format=format:%H %ct %D'
>> 378a88163ba50ea08f9ce738c442403ed4826a0e
>> cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>> git cat-file blob 378a88163ba50ea08f9ce738c442403ed4826a0e:go.mod
>> 0.007s # cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>> git cat-file blob 378a88163ba50ea08f9ce738c442403ed4826a0e:go.mod
>> cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>> git tag -l
>> 0.008s # cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>> git tag -l
>> Fetching https://gitlab.company.com/vladislav.mitov?go-get=1
>> Parsing meta tags from
>> https://gitlab.company.com/vladislav.mitov?go-get=1 (status code 200)
>> get "gitlab.company.com/vladislav.mitov": found meta tag
>> get.metaImport{Prefix:"gitlab.company.com/vladislav.mitov", VCS:"git",
>> RepoRoot:"https://gitlab.company.com/vladislav.mitov"} at
>> https://gitlab.company.com/vladislav.mitov?go-get=1
>> mkdir -p /home/master/Workspace/go/pkg/mod/cache/vcs # git2
>> https://gitlab.company.com/vladislav.mitov
>> # lock
>> /home/master/Workspace/go/pkg/mod/cache/vcs/2bc342ebf7b7d4d45c8e55b84543156cce227042795620ba6431e5a474c93622.lock#
>> /home/master/Workspace/go/pkg/mod/cache/vcs/2bc342ebf7b7d4d45c8e55b84543156cce227042795620ba6431e5a474c93622
>> for git2 https://gitlab.company.com/vladislav.mitov
>> cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/2bc342ebf7b7d4d45c8e55b84543156cce227042795620ba6431e5a474c93622;
>> git ls-remote -q https://gitlab.company.com/vladislav.mitov
>> 1.315s # cd
>> /home/master/Workspace/go/pkg/mod/cache/vcs/2bc342ebf7b7d4d45c8e55b84543156cce227042795620ba6431e5a474c93622;
>> git ls-remote -q https://gitlab.company.com/vladislav.mitov
>> Fetching https://gitlab.company.com?go-get=1
>> Parsing meta tags from https://gitlab.company.com?go-get=1 (status code
>> 200)
>> build command-line-arguments: cannot load
>> gitlab.company.com/vladislav.mitov/service/pkg/client: cannot find
>> module providing package
>> gitlab.company.com/vladislav.mitov/service/pkg/client
>
>
>
> On Monday, April 8, 2019 at 4:54:49 PM UTC+3, Vladislav Mitov wrote:
>>
>> Hello gophers,
>>
>> I'm migrating my codebase to modules and I encountered an issue that I
>> can't figure how to solve.
>>
>> So, it is a code for a multi service application and each service is
>> structured in the following way:
>>
>> .
>> ├── service
>> │   ├── cmd
>> │   │   └── service
>> │   │       ├── go.mod
>> │   │       └── main.go
>> │   └── pkg
>> │       ├── client
>> │       │   ├── client.go
>> │       │   └── go.mod
>> │       └── service
>> │           ├── go.mod
>> │           └── service.go
>>
>>
>> Where cmd/service is the main implementation and it requires pkg/service.
>> pkg/client is a client for use in other services and it also requires
>> pkg/service. All tree are modules and all replace internal dependencies
>> like that:
>>
>> pkg/go.mod
>>
>> module gitlab.company.com/vladislav.mitov/service/pkg/client
>>
>> go 1.12
>>
>> require gitlab.company.com/vladislav.mitov/service/pkg/service v0.0.0-
>> 00010101000000-000000000000
>>
>> replace gitlab.company.com/vladislav.mitov/service/pkg/service => ../
>> service
>>
>> The reason for this structure is that we want all the code related to a
>> service to be in one place and the reason for the multi modules is that by
>> doing that if you import service/pkg/client you don't get the dependencies
>> for service/cmd/service.
>>
>> This looks very good but when I import service/pkg/client from another
>> service I get:
>>
>> go: finding gitlab.company.com/vladislav.mitov/service latest
>> build command-line-arguments: cannot load
>> gitlab.company.com/vladislav.mitov/service/pkg/client: cannot find
>> module providing package
>> gitlab.company.com/vladislav.mitov/service/pkg/client
>>
>> And if I add some debugging info - go run -v -x main.go
>>
>> WORK=/tmp/go-build174805868
>>> Fetching
>>> https://gitlab.company.com/vladislav.mitov/service/pkg/client?go-get=1
>>> Parsing meta tags from
>>> https://gitlab.company.com/vladislav.mitov/service/pkg/client?go-get=1
>>> (status code 200)
>>>
>>> get "gitlab.company.com/vladislav.mitov/service/pkg/client": found meta
>>> tag get.metaImport{Prefix:"
>>> gitlab.company.com/vladislav.mitov/service/pkg/client", VCS:"git",
>>> RepoRoot:"https://gitlab.company.com/vladislav.mitov/service/pkg/client"}
>>> at
>>> https://gitlab.company.com/vladislav.mitov/service/pkg/client?go-get=1
>>> mkdir -p /home/master/Workspace/go/pkg/mod/cache/vcs # git2
>>> https://gitlab.company.com/vladislav.mitov/service/pkg/client
>>>
>>> # lock
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/ff338c7e0e1ae4b0396cc581329d58d26a1e39c55116c29c97948a4a64c797a9.lock#
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/ff338c7e0e1ae4b0396cc581329d58d26a1e39c55116c29c97948a4a64c797a9
>>> for git2 https://gitlab.company.com/vladislav.mitov/service/pkg/client
>>> cd
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/ff338c7e0e1ae4b0396cc581329d58d26a1e39c55116c29c97948a4a64c797a9;
>>> git ls-remote -q
>>> https://gitlab.company.com/vladislav.mitov/service/pkg/client
>>>
>>> 0.663s # cd
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/ff338c7e0e1ae4b0396cc581329d58d26a1e39c55116c29c97948a4a64c797a9;
>>> git ls-remote -q
>>> https://gitlab.company.com/vladislav.mitov/service/pkg/client
>>> Fetching https://gitlab.company.com/vladislav.mitov/service/pkg?go-get=1
>>> Parsing meta tags from
>>> https://gitlab.company.com/vladislav.mitov/service/pkg?go-get=1 (status
>>> code 200)
>>> get "gitlab.company.com/vladislav.mitov/service/pkg": found meta tag
>>> get.metaImport{Prefix:"gitlab.company.com/vladislav.mitov/service/pkg",
>>> VCS:"git", RepoRoot:"
>>> https://gitlab.company.com/vladislav.mitov/service/pkg"} at
>>> https://gitlab.company.com/vladislav.mitov/service/pkg?go-get=1
>>> mkdir -p /home/master/Workspace/go/pkg/mod/cache/vcs # git2
>>> https://gitlab.company.com/vladislav.mitov/service/pkg
>>>
>>>
>>> # lock
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/09f143e37d8fc82802c4ce59d3fec02d19347221fe46af231bfa83e1bacd4f7a.lock#
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/09f143e37d8fc82802c4ce59d3fec02d19347221fe46af231bfa83e1bacd4f7a
>>> for git2 https://gitlab.company.com/vladislav.mitov/service/pkg
>>> cd
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/09f143e37d8fc82802c4ce59d3fec02d19347221fe46af231bfa83e1bacd4f7a;
>>> git ls-remote -q https://gitlab.company.com/vladislav.mitov/service/pkg
>>>
>>> 0.672s # cd
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/09f143e37d8fc82802c4ce59d3fec02d19347221fe46af231bfa83e1bacd4f7a;
>>> git ls-remote -q https://gitlab.company.com/vladislav.mitov/service/pkg
>>>
>>> Fetching https://gitlab.company.com/vladislav.mitov/service?go-get=1
>>> Parsing meta tags from
>>> https://gitlab.company.com/vladislav.mitov/service?go-get=1 (status
>>> code 200)
>>> get "gitlab.company.com/vladislav.mitov/service": found meta tag
>>> get.metaImport{Prefix:"gitlab.company.com/vladislav.mitov/service",
>>> VCS:"git", RepoRoot:"https://gitlab.company.com/vladislav.mitov/service"}
>>> at https://gitlab.company.com/vladislav.mitov/service?go-get=1
>>> mkdir -p /home/master/Workspace/go/pkg/mod/cache/vcs # git2
>>> https://gitlab.company.com/vladislav.mitov/service
>>>
>>>
>>> # lock
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4.lock#
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4
>>> for git2 https://gitlab.company.com/vladislav.mitov/service
>>> cd
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>>> git ls-remote -q https://gitlab.company.com/vladislav.mitov/service
>>>
>>> 0.823s # cd
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/d80081ef39cfc1cf3eab3e5e235a832587b977ece2e7753ea963c6c7a32a5cf4;
>>> git ls-remote -q https://gitlab.company.com/vladislav.mitov/service
>>>
>>> go: finding gitlab.company.com/vladislav.mitov/service latest
>>> Fetching https://gitlab.company.com/vladislav.mitov?go-get=1
>>> Parsing meta tags from
>>> https://gitlab.company.com/vladislav.mitov?go-get=1 (status code 200)
>>> get "gitlab.company.com/vladislav.mitov": found meta tag
>>> get.metaImport{Prefix:"gitlab.company.com/vladislav.mitov", VCS:"git",
>>> RepoRoot:"https://gitlab.company.com/vladislav.mitov"} at
>>> https://gitlab.company.com/vladislav.mitov?go-get=1
>>> mkdir -p /home/master/Workspace/go/pkg/mod/cache/vcs # git2
>>> https://gitlab.company.com/vladislav.mitov
>>>
>>>
>>> # lock
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/2bc342ebf7b7d4d45c8e55b84543156cce227042795620ba6431e5a474c93622.lock#
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/2bc342ebf7b7d4d45c8e55b84543156cce227042795620ba6431e5a474c93622
>>> for git2 https://gitlab.company.com/vladislav.mitov
>>> cd
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/2bc342ebf7b7d4d45c8e55b84543156cce227042795620ba6431e5a474c93622;
>>> git ls-remote -q https://gitlab.company.com/vladislav.mitov
>>>
>>> 1.292s # cd
>>> /home/master/Workspace/go/pkg/mod/cache/vcs/2bc342ebf7b7d4d45c8e55b84543156cce227042795620ba6431e5a474c93622;
>>> git ls-remote -q https://gitlab.company.com/vladislav.mitov
>>>
>>> Fetching https://gitlab.company.com?go-get=1
>>> Parsing meta tags from https://gitlab.company.com?go-get=1 (status code
>>> 200)
>>> build command-line-arguments: cannot load
>>> gitlab.company.com/vladislav.mitov/service/pkg/client: cannot find
>>> module providing package
>>> gitlab.company.com/vladislav.mitov/service/pkg/client
>>
>>
>> I should note that we host the code in Gitlab who are still now dealing
>> with ?go-get=1 request properly, although based on the debug information
>> above it looks like the problem in not in gitlab.
>>
>> I really don't want to revert it to a one module in the root because that
>> way I fetch way too many dependencies in other-service or separate to
>> multiple repositories.
>>
>> Any idea what could be the issue or how to debug/fix it?
>>
>> Thanks,
>> Vladi
>>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to