bazel-contrib / bazel-contrib/rules_scala
scalapb_proto_library doesn't support custom TypeMappers anymore?
- Dominant language
- Starlark
- Stars
- 384
- Forks
- 292
- Avg merge
- 3d 28m
- Merged PRs (30d)
- 40
Description
Hi!
After switching on aspect-based protobuf compilation (#700) it seems like it's no longer possible to use custom `TypeMapper` from ScalaPB. At the first glance the reason is that bazel tries to generate scala code from `proto_library` (`%name-fast` rule) but there is no way to specify scala libraries for `proto_library` (at least I haven't found).
It feels like it used to work before because previously bazel was using `scalapb_proto_library` with its `deps` to generate final scala code, where you can specify additional custom classes.
I've also prepared [small example which reproduces this issue](https://github.com/sholokhov/bazel-scalapb-example).
Bazel version - `0.25.2`
rules_scala - `b2e12827240fc488bbe5ebbbbcbc7a4f12ca02f2`
Contributor guide
Research direction
Start with the linked bazel-scalapb-example and compare the aspect-based compilation introduced in #700 with the scalapb_proto_library path. Inspect how %name-fast is generated from proto_library and how custom TypeMapper classes are supplied through deps. Done means the example can use a custom ScalaPB TypeMapper with aspect-based compilation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100