Comments (12)
I just put the complete code in a new repository:
https://github.com/dadadom/failing-reactor-grpc/
from reactive-grpc.
Released in 0.7.3
from reactive-grpc.
Weird...I'll look into it. I wonder if this also affects the maven generator.
from reactive-grpc.
Sorry @rmichela , actually does fail with maven and the following pom.xml
as well:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>mystuff</groupId>
<artifactId>mytesting</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.salesforce.servicelibs</groupId>
<artifactId>reactor-grpc-stub</artifactId>
<version>0.7.1</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.8.0</version>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.4.1.Final</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.1</version>
<extensions>true</extensions>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.5.0:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.8.0:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
<configuration>
<protocPlugins>
<protocPlugin>
<id>reactor-grpc</id>
<groupId>com.salesforce.servicelibs</groupId>
<artifactId>reactor-grpc</artifactId>
<version>0.7.1</version>
<mainClass>com.salesforce.reactorgrpc.ReactorGrpcGenerator</mainClass>
</protocPlugin>
</protocPlugins>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
from reactive-grpc.
@cbornet Any ideas?
from reactive-grpc.
After some further investigation, it seems that this only fails iff the filename and the message name resolve to the same Java notation. In that case, the generated inputType
and outputType
for the mustache template, generated by the ProtoTypeMap
from grpc-java-contrib seem to be wrongly generated.
I guess that the culprit is somewhere around https://github.com/salesforce/grpc-java-contrib/blob/master/jprotoc/src/main/java/com/salesforce/jprotoc/ProtoTypeMap.java#L54 , but I would have to investigate a bit further.
If needed, just close this issue and create a new one in https://github.com/salesforce/grpc-java-contrib
from reactive-grpc.
Root Cause
- Absent
option java_outer_classname
, protoc generates an outer java class for each .proto file with a name derived from the .proto file name. - If no explicit
java_outer_classname
is specified in the .proto file, the class name will be constructed by converting the .proto file name to camel-case (sofoo_bar.proto
becomesFooBar.java
) - Protoc generates an inner class for each
message
type in the proto with a name that matches themessage
type name. - In the event of a name conflict between the outer and inner type names, protoc adds an
OuterClass
suffix to the outer type's name.
JProtoc is not correctly accounting for the name collision between the outer and inner class name.
Workarounds
- Add
option java_outer_classname = "SomeParameterProto";
tosome_parameter.proto
. - Rename
some_parameter.proto
.
Mitigation
- Fix JProtoc salesforce/grpc-java-contrib#66
- Update Reactive-gRPC generator
from reactive-grpc.
salesforce/grpc-java-contrib#67
from reactive-grpc.
Any plans on releasing updated versions of jprotoc and reactive-grpc?
from reactive-grpc.
Yes. Today
from reactive-grpc.
salesforce/grpc-java-contrib#70
from reactive-grpc.
You guys rock, thanks!
from reactive-grpc.
Related Issues (20)
- Wrong manifest main class rx3grpc HOT 4
- Backpressure Demo has compile error on Windows
- stub.invoke().retry() throws exception HOT 1
- Async resource cleanup failed after onComplete / call already closed HOT 2
- Add onDiscard hook support to AbstractStreamObserverAndPublisher
- host_javabase is deprecated HOT 1
- Possible to have non-publisher for RPC method parameter? HOT 2
- In ManyToOne and ManyToMany, remote method is called before the client subscribe
- project still active? HOT 1
- UnsupportedOperationException thrown in the generated stub with Java 17 HOT 2
- Unexpedted error log HOT 1
- Dropped Error on Bidi Stream After Broken TCP Connection HOT 2
- Subscription Should be Cancelled on Interceptor Close HOT 3
- How about a new stable release? HOT 14
- Migrate reactive-grpc to grpc-ecosystem HOT 2
- Indeterminate cancel or error when streaming bidirectionally
- Question: how can Spring reactive-grpc support credentials on server HOT 2
- Bazel demo does not compile HOT 1
- How to customize ClientInterceptor and ServerInterceptor HOT 1
- `reactor-grpc-1.2.4-osx-x86_64.exe` is removed from mac on intel HOT 1
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 reactive-grpc.