title: Bazel build, protobuf and code completion
body: <p>When using <a href="https://bazel.build/" rel="nofollow noreferrer">Bazel</a> to build a project that contains <code>.proto</code> files, we can use, for example, <code>go_binary</code> and <code>go_proto_library</code> rules to create a binary. The generated binary will work as expected, but the code generated from the <code>.proto</code> files is not in the working directory.</p>
  
  <p>As a result, code completion in editors and IDEs will not work. Even worse, they will often print errors about invalid import statements.</p>
  
  <p>This is an example using protocol buffers, but there are probably other similar cases, such as using third party dependencies.</p>
  
  <p>How is this usually handled?</p>