Git Product home page Git Product logo

Comments (4)

pcj avatar pcj commented on July 19, 2024

I'll think about it a bit more, but off the top of my head, would this work?

  1. Change the hardcoded entries in go/class.bzl compile_deps to an "//external:glog" form.
  2. Support suppression of loading of unwanted deps, such as:
protobuf_repositories(
    exclude = ["com_github_golang_glog"]
)

bind(
   name = "glog", 
   actual = "//vendor/github.com/golang/glog"
)

Can you also try changing your dependency from the library to the source? (note the ".pb" implicit dependecy)? Curious if that is a workaround

go_library(
    name = "go_default_library",
    visibility = ["//visibility:public"],
    srcs = [
        "store.go",
        "//tools/artifact/proto:go_default_library.pb",
    ],
    deps = [
        "//vendor/github.com/golang/glog:go_default_library",
        "//vendor/google.golang.org/cloud/datastore:go_default_library",
    ],
)

from rules_protobuf.

bshi avatar bshi commented on July 19, 2024

Using bind was my thought as well and works for me. I will try the report back regarding the implicit .pb dependency tonight. Thanks Paul.

from rules_protobuf.

pcj avatar pcj commented on July 19, 2024

Did the bind solution work without forking?

from rules_protobuf.

bshi avatar bshi commented on July 19, 2024

The workaround resulted in

ERROR: /???/experiments.git/tools/artifact/db/BUILD:7:1: error executing shell command: 'rm -rf bazel-out/local-fastbuild/bin/tools/artifact/db/go_default_library.a.dir && mkdir -p bazel-out/local-fastbuild/bin/tools/artifact/db/go_default_library.a.dir && mkdir -p bazel-out/local-fast...' failed: linux-sandbox failed: error executing command /???/.cache/bazel/_bazel_bshi/08ef9c7ff335ac2219f037954496dcb0/execroot/experiments.git/_bin/linux-sandbox ... (remaining 5 argument(s) skipped).
???/experiments.git/tools/artifact/db/store.go:11: can't find import: "???/experiments.git/tools/artifact/proto"

Have not had a chance to investigate further. I haven't attempted the bind approach myself (no ETA unfortunately).

from rules_protobuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.