irfansharif / solver

SAT solver library in Go; wraps around Google's Operational Research Tools
Apache License 2.0
23 stars 9 forks source link

make generate fails with a protobuf module #7

Closed thomaspeugeot closed 2 years ago

thomaspeugeot commented 2 years ago

Configuration:

thomaspeugeot@MacBook-Pro-de-Thomas solver % uname -a
Darwin MacBook-Pro-de-Thomas.local 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_X86_64 x86_64
thomaspeugeot@MacBook-Pro-de-Thomas solver % bazel --version
bazel 5.1.1
thomaspeugeot@MacBook-Pro-de-Thomas solver % swig -version 

SWIG Version 4.0.2

Compiled with g++ [x86_64-apple-darwin21.3.0]

Configured options: +pcre

Please see http://www.swig.org for reporting bugs and further information
thomaspeugeot@MacBook-Pro-de-Thomas solver % protoc --version
libprotoc 3.17.3
thomaspeugeot@MacBook-Pro-de-Thomas solver % protoc-gen-go --version
protoc-gen-go v1.28.0

Steps:

Problem:

thomaspeugeot@MacBook-Pro-de-Thomas solver % make generate
--- generating go:generate files
--- tidying go.{mod,sum}
go: finding module for package github.com/protocolbuffers/protobuf/examples/tutorial
github.com/irfansharif/solver/c-deps/protobuf/examples imports
        github.com/protocolbuffers/protobuf/examples/tutorial: module github.com/protocolbuffers/protobuf@latest found (v3.20.0+incompatible), but does not contain package github.com/protocolbuffers/protobuf/examples/tutorial
make: *** [gogenerate] Error 1
irfansharif commented 2 years ago

https://github.com/protocolbuffers/protobuf/commit/c8dfe32b5ac190cecd8750db438c4151ab07a3da#diff-713e5905edce021436837e21eb2eb3bd9de38e1a4a75aca9b473069ff7879ac7R8 Looks like the problematic file was fixed upstream, but the pinned protobuf SHA doesn't have the patch. We don't actually use the vendored submodule for anything and it should be safe to remove. Try that perhaps? If that works, I'll welcome a PR. I can try it myself in a little bit if you don't already beat me to it.

thomaspeugeot commented 2 years ago

cool, it works. thks