Comments (7)
@dmarticus, to add some clarity, my problems with the package
option are:
- It is mandatory for skeuomorph to function, but not for protoc.
- It influences where the resulting files will be generated. While there are workarounds around this, I am inclined to believe it should have only "semantic" meaning, i.e. how services should be referenced.
As for a real-world example, my original .proto
files do not have the package
option and I cannot really change them as they are used across multiple teams. But even adding the package
option is kind of fruitless without the muSrcGenIdiomaticEndpoints
as clients generated by protoc will not be able to reference the service without the package prefix.
from skeuomorph.
@a7emenov we should be releasing this change this week! Thanks for your help in providing the context around it and I hope you find the changes helpful :)
from skeuomorph.
@a7emenov do you have an example protobuf file that I could work with that you'd like to be able to use with mu and skeuomorph? I'm planning on implementing this behavior this week and I'd love to have a file that you want to be able to convert to use as a test case
from skeuomorph.
@dmarticus, sure, thank you so much for a swift response.
Example 1:
-
File:
syntax = "proto3"; option java_package = "my_package"; service MyService { rpc Check(MyRequest) returns (MyResponse); } message MyRequest { string value = 1; } message MyResponse { string value = 1; }
-
Expected:
MyService
service will be generated under "my_package" package. -
Actual:
Service generation fails as thepackage
option is not provided.
Example 2:
-
File:
syntax = "proto3"; package other_package; option java_package = "my_package"; service MyService { rpc Check(MyRequest) returns (MyResponse); } message MyRequest { string value = 1; } message MyResponse { string value = 1; }
-
Expected:
MyService
service will be generated under "my_package" package. -
Actual:
MyService
service is generated under "other_package" package.
from skeuomorph.
Thank you for sharing! These will be some great test cases for my implementation; I appreciate it!
from skeuomorph.
@dmarticus, I can't properly express how much this helps! Much obliged for acting so swiftly, this basically allows to keep using mu
in the project. Looking forward to the release!
from skeuomorph.
@a7emenov my pleasure! It's great to have users who push the envelope of what we've made and identify gaps, so I appreciate you for that. The release went out today (https://gitter.im/47deg/mu?at=5f4d6fa5dfaaed4ef521757a), and I'll publish the changes to sbt-mu-srcgen
shortly.
from skeuomorph.
Related Issues (20)
- Fix proto imports cannot see other proto folders HOT 7
- Protobuf oneOf to generate coproducts without Option-ality HOT 3
- Add a new combinator to escape Scala reserved words
- Tut readme out of sync
- Support parquet data schema
- mapStringToGen Scalacheck generator
- Add documentation HOT 2
- Proto2 primitives should be Option[primitive] HOT 2
- OpenApiSchemaSpec flaky test
- Unescaped 'type' keyword in package (directory) name HOT 6
- Unexpected behavior? - OpenAPIParser
- support avro logical type? HOT 5
- Invalid enums generated if `package` option is not supplied HOT 2
- BinaryF is incorrectly represented as List[Boolean]
- Remove `scala.jdk.CollectionConverters` from skeuomorph once the avrohugger migration has been completed
- Scala 3 support
- No support for M1 Macs HOT 4
- openapi Sum type generation is broken for scala 2.13.11 HOT 1
- Release v0.2.2 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 skeuomorph.