Open haneul opened 1 year ago
Hi, @haneul,
this happens because descriptor_set_out
(the output of proto_library
) does not include source info. To change that you have to add build --protocopt=--include_source_info
to your .bazelrc
then scalapb
should see source info.
Let me know if that helps.
We used an old version of rules_scala for a while, and recently tried to upgrade but found that scalapb option retain_source_code_info doesn't work as expected.
Added an example into https://github.com/haneul/scalapbtest The current master HEAD doesn't contain code info in the generated code. While it works with https://github.com/haneul/scalapbtest/tree/cd723982dae484796e31bbd9237e6cd8cd4fbd9c
Looking into the generated TestEnum.scala working version:
non-working version:
Looking into history of rules_scala, the behavior changed after https://github.com/bazelbuild/rules_scala/commit/1162eea0115816239b67fb003d09ecc2eba3b3fc
Not sure what exactly caused the issue though.