grpc / grpc

The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io
Apache License 2.0
41.92k stars 10.55k forks source link

switched_rules_by_language creates an ordering dependency on users #25931

Open gnossen opened 3 years ago

gnossen commented 3 years ago

Quoting this comment from a user who pulls us in via Bazel.

Just a note, this caused a quite painful debugging after upgrading to gRPC 1.37.0 (first release with this commit) - I was calling switched_rules_by_language after grpc_extra_deps in my workspace, which ended up being ignored - so I only got C++ and Python, while I was also interested in Java support. switched_rules_by_language just silently ignores every call after the first, apparently.

Where this might get really problematic is the other way around - what happens if I call switched_rules_by_language with e.g. just Java support before calling grpc_extra_deps? I wonder if we can do something not involving having switched_rules_by_language in there...

This ordering dependency is an undue burden on folks who use googleapis multiple ways (e.g. transitively, through two different direct dependencies). If at all possible, we should switch away from using this repo rule entirely.

yashykt commented 7 months ago

@gnossen what needs to be done here?