Comments (2)
Hi Per,
The place to start with is at:
https://github.com/trueaccord/ScalaPB/blob/master/compiler-plugin/src/main/scala/com/trueaccord/scalapb/compiler/Process.scala
In runWithInputStream
the request from protoc (in form of a
CodeGeneratorRequest) is parsed and passed to ProtobufGenerator.
protoc supports invoking multiple plugins in a single run. In Process.scala
there is a trick that we do to make protoc send the CodeGeneratorRequest
back to the JVM that invoked it (which is done differently for Windows and
Linux/Mac), but it would be fairly straightforward to extend the trick to
handle multiple plugins...
On Mon, Dec 7, 2015 at 4:34 PM, Per Wiklander [email protected]
wrote:
Since I have all my messages as photo I would like to take advantage of
that and generate all boiler plate code for my application.Examples of generated code other than plain case classes:
- Custom JSON ser / dser
- Slick table models
- Web forms with input validation
What I'm looking for here is an easy way of pluggin my own custom code
generator into ScalaPB's pipeline.Any thoughts on that? How hard is it to do this today if I fork the
project?—
Reply to this email directly or view it on GitHub
#61.
-Nadav
from scalapb.
ScalaPB uses a new SBT plugin sbt-protoc, which allows creating custom generators.
See https://github.com/thesamet/sbt-protoc
from scalapb.
Related Issues (20)
- Converting the result List[MAp[String,Any]] into scala.Option[com.google.protobuf.struct.Struct] HOT 3
- Feature request: add the ability to change the name of a rpc function HOT 3
- Update protobuf-java to 3.19.6 HOT 1
- Support and document buf HOT 13
- FieldMaskUtil.merge support HOT 4
- Field named `instance_of` in `oneof` causes redefinition of `isInstanceOf`
- [proposal] Allow Custom Generator Options HOT 5
- DataBricks imports `spark.implicits._` by default, is there a way to get around this? HOT 1
- trouble building under java8 on arm64 HOT 5
- Option message in option.proto fails HOT 1
- Efficiently convert bytes to strings HOT 6
- Spark 3.3 NoSuchMethodErorr HOT 7
- A way to set level preserve_unknown_fields for the project level. HOT 4
- Option to generate `class` instead of `case class` HOT 1
- Protobuf map with message as value won't compile HOT 3
- `collection_type` and `extends` with a `repeated` field does not compile HOT 4
- Support more than 254 fields HOT 1
- Cyclic Error when compiling protobuf-java 3.24.0 on Scala 3.3.0
- Add option to generate only gRPC service and method descriptors. HOT 1
- Custom target directory breaks incremental compilation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scalapb.