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

Avoid module on binary #164

Merged
merged 3 commits into from
Oct 9, 2023

Conversation

Tatskaari
Copy link
Contributor

@Tatskaari Tatskaari commented Oct 9, 2023

This was causing issues with go_binary rules generated in go_repos:

➜  please git:(update-plugins) plz build ///third_party/go/github.com_googlecodelabs_tools_claat//:claat
Build stopped after 30ms. 1 target failed:
    ///third_party/go/github.com_googlecodelabs_tools_claat//:claat
plz-out/subrepos/third_party/go/github.com_googlecodelabs_tools_claat/BUILD:3:1: error: Unknown argument to go_binary: _module

go_binary(
^
    name = "claat",

@Tatskaari Tatskaari merged commit 7239967 into please-build:master Oct 9, 2023
4 checks passed
@izissise
Copy link
Contributor

I think a got a bug because of this,it was really hard to track down

with

go_repo(
    module="gitlab.com/nbdkit/nbdkit/plugins/golang/src/libguestfs.org/nbdkit",
    version="712fe24c18df21567e566a013d92f9138666ec8c",
    install=["nbdkit"],
)

I get

cgo_library(
    name = "nbdkit",
    srcs = [
        "nbdkit.go",
        "utils.go",
        "wrappers.go",
    ],
    hdrs = ["wrappers.h"],
    _module = "gitlab.com/nbdkit/nbdkit/plugins/golang/src/libguestfs.org/nbdkit@712fe24c18df21567e566a013d92f9138666ec8c",
    go_srcs = [],
    linker_flags = ["-Wl,--unresolved-symbols=ignore-in-object-files"],
    visibility = ["PUBLIC"],
)

and
error: Unknown argument to cgo_library: _module

@izissise izissise mentioned this pull request Oct 26, 2023
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

Successfully merging this pull request may close these issues.

3 participants