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
proto_library(
name = "protos",
srcs = ["foo.proto"]
)
objc_proto_library(
name = "objc_protos",
deps = ["protos"],
)
Results in:
ERROR: /Users/dnkoutso/Development/ios/sample-monorepo/Frameworks/protos/BUILD:6:1: every rule of type objc_proto_library implicitly depends upon the target '@bazel_tools//tools/objc:compile_protos', but this target could not be found because of: no such target '@bazel_tools//tools/objc:compile_protos': target 'compile_protos' not declared in package 'tools/objc' defined by /private/var/tmp/_bazel_dnkoutso/bcca89e91e31c3214400660a1b84dd36/external/bazel_tools/tools/objc/BUILD.
ERROR: /Users/dnkoutso/Development/ios/sample-monorepo/Frameworks/protos/BUILD:6:1: every rule of type objc_proto_library implicitly depends upon the target '@bazel_tools//tools/objc:proto_support', but this target could not be found because of: no such target '@bazel_tools//tools/objc:proto_support': target 'proto_support' not declared in package 'tools/objc' (did you mean 'protobuf_support'?) defined by /private/var/tmp/_bazel_dnkoutso/bcca89e91e31c3214400660a1b84dd36/external/bazel_tools/tools/objc/BUILD.
Is objc protobuf support fully implemented and working or am I missing something?
You're perfectly right, this is a bug, we ought to have those targets in tools/objc/BUILD.
Weird, the relevant code was added ages ago, yet the BUILD file, as far as I can tell, never had these targets. It appears you're the first one to use it :)
@pcj - I need dependencies for objc to be propagated. When I have X depending on Y both objc_proto_library, I get error which says headers generated by Y is not found. How do I propagate the dependencies? I can make the change if I am pointed in right direction.
I do see both headers generated though. The error happens when objc_library builds the generated X.m file.
Is objc_proto_library ready. to be used now @sergiocampama ? I'm still getting the same error:
ERROR: /Users/obonilla/o/bazel-tests/objc-proto/x/BUILD:6:1: every rule of type objc_proto_library implicitly depends upon the target '@bazel_tools//tools/objc:protobuf_lib', but this target could not be found because of: no such target '@bazel_tools//tools/objc:protobuf_lib': target 'protobuf_lib' not declared in package 'tools/objc' defined by /private/var/tmp/_bazel_obonilla/b3ec2a683ae91108aaaf199a84fecf9a/external/bazel_tools/tools/objc/BUILD
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.
Activity
dnkoutso commentedon Sep 20, 2016
Both of these targets are non-existent in
tools/objclaszlocsomor commentedon Sep 21, 2016
You're perfectly right, this is a bug, we ought to have those targets in
tools/objc/BUILD.Weird, the relevant code was added ages ago, yet the BUILD file, as far as I can tell, never had these targets. It appears you're the first one to use it :)
laszlocsomor commentedon Sep 21, 2016
@sergiocampama You added the relevant lines, do you know how to create the missing targets in //tools/objc/BUILD?
sergiocampama commentedon Sep 21, 2016
objc_proto_library is not ready to be used, as the scripts in tools/objc say:
https://github.com/bazelbuild/bazel/blob/master/tools/objc/protobuf_compiler.py
so even if we add dummy targets, nothing will be generated/compiled...
dnkoutso commentedon Sep 21, 2016
Thanks for confirming, seems like we will have to implement it with a custom build rule for now.
pcj commentedon Sep 22, 2016
If all you need are the objective-c outputs from protoc, consider https://github.com/pubref/rules_protobuf/tree/master/objc#objc_proto_compile.
I have not had time to focus much on the gathering the dependencies for an objc_proto_library implementation but would invite you to contribute.
makdharma commentedon May 2, 2017
Is objc_proto_library ready to be used? The documentation at https://bazel.build/versions/master/docs/be/objective-c.html#objc_proto_library seems to say so, but I still can't use it because the target compile_protos is not in the tools/objc/BUILD file. Please either add the target or fix the documentation.
thaidn commentedon Jul 27, 2017
Has objc_proto_library worked yet? We want to use it in github.com/google/tink.
tl0gic commentedon Sep 25, 2017
Any update on this? We really want to use it in github.com/google/tink. Thanks! :)
pcj commentedon Sep 25, 2017
@thaidn Glad at least the code in
rules_protobufworked for you 😺thaidn commentedon Sep 25, 2017
@pcj your code has saved us countless hours. thank you very much!
spinorx commentedon Oct 23, 2017
@pcj - I need dependencies for objc to be propagated. When I have X depending on Y both objc_proto_library, I get error which says headers generated by Y is not found. How do I propagate the dependencies? I can make the change if I am pointed in right direction.
I do see both headers generated though. The error happens when objc_library builds the generated X.m file.
pcj commentedon Oct 23, 2017
@spinorx Can you file an issue on rules_protobuf, ideally with a repro? (Will be easier to track there). Thanks.
spinorx commentedon Oct 23, 2017
Done: pubref/rules_protobuf#146
ob commentedon Sep 26, 2018
Is
objc_proto_libraryready. to be used now @sergiocampama ? I'm still getting the same error:sergiocampama commentedon Oct 1, 2018
No,
objc_proto_libraryis not functional yet. We haven't had the time to prioritize this work.sgowroji commentedon Jan 23, 2023
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.