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
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.
Looking into the generated TestEnum.scala
working version:
object TestEnum extends _root_.scalapb.GeneratedEnumCompanion[TestEnum] {
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[TestEnum] = this
/** test1
*/
@SerialVersionUID(0L)
case object TEST1 extends TestEnum {
val value = 0
val index = 0
val name = "TEST1"
override def isTest1: _root_.scala.Boolean = true
}
non-working version:
object TestEnum extends _root_.scalapb.GeneratedEnumCompanion[TestEnum] {
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[TestEnum] = this
@SerialVersionUID(0L)
case object TEST1 extends TestEnum {
val value = 0
val index = 0
val name = "TEST1"
override def isTest1: _root_.scala.Boolean = true
}
Looking into history of rules_scala, the behavior changed after 1162eea
Not sure what exactly caused the issue though.
The text was updated successfully, but these errors were encountered:
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.
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 1162eea
Not sure what exactly caused the issue though.
The text was updated successfully, but these errors were encountered: