Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace directives not working for changing a package name #305

Open
manfredlift opened this issue Oct 29, 2024 · 0 comments
Open

replace directives not working for changing a package name #305

manfredlift opened this issue Oct 29, 2024 · 0 comments

Comments

@manfredlift
Copy link

I have a Go repo where a package has a replace rule such as:

replace github.com/google/martian/v3 v3.2.1 => internal.dev.com/internal/martian/v3 v3.0.0-20201029001542-dd3e191f6e3c

With puku it generated dependencies like:

go_mod_download(
    name = "internal.dev.com_internal_martian_v3_dl",
    labels = ["go_replace_directive"],
    licences = ["Apache-2.0"],
    module = "internal.dev.com/internal/martian/v3",
    version = "v3.0.0-20201029001542-dd3e191f6e3c",
)

go_repo(
    download = ":internal.dev.com_internal_martian_v3_dl",
    labels = ["go_replace_directive"],
    module = "github.com/google/martian/v3",
)

But when I try to compile my package with the latest go-rules (v1.21.5) then I get errors like:

    ///third_party/go/github.com_google_martian_v3//parse:parse
Error building target ///third_party/go/github.com_google_martian_v3//parse:parse: exit status 1
pkg/darwin_arm64/github.com/google/martian/v3/parse/parse.go, line 23, column 2: could not import github.com/google/martian/v3 (open : no such file or directory)
pkg/darwin_arm64/github.com/google/martian/v3/parse/parse.go, line 38, column 9: undefined: martian
pkg/darwin_arm64/github.com/google/martian/v3/parse/parse.go, line 39, column 9: undefined: martian
pkg/darwin_arm64/github.com/google/martian/v3/parse/parse.go, line 47, column 24: undefined: martian
pkg/darwin_arm64/github.com/google/martian/v3/parse/parse.go, line 48, column 24: undefined: martian
pkg/darwin_arm64/github.com/google/martian/v3/parse/parse.go, line 81, column 36: undefined: martian
pkg/darwin_arm64/github.com/google/martian/v3/parse/parse.go, line 88, column 37: undefined: martian

Any suggestions? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant