Repository: poem-web/poem (language: rust)

Issue:
Grpc Build: Format service name as `.{proto_name}` when package is empty
## Expected Behavior


## Actual Behavior
When package is empty the service name is formated as `.{proto_name}`
https://github.com/poem-web/poem/blob/e2f3c581bfec086cee1eed27deae2f67a1a8abfc/poem-grpc-build/src/server.rs#L39-L43

However the reflection api don't think so
https://github.com/poem-web/poem/blob/e2f3c581bfec086cee1eed27deae2f67a1a8abfc/poem-grpc/src/reflection.rs#L233-L239

May we emit package when package name is empty?

## Steps to Reproduce the Problem

1. Create a service with empty package name
2. Use reflection
3. Use postman to get service definition by server reflection. And send a request
4. Result 404 not found



## Specifications

- Version: poem-grpc-build 0.4.0, poem-grpc 0.4.1
- Platform: linux
- Subsystem: ubuntu22.04-wsl


Discussion / hints:

Fix patch:
diff --git a/poem-grpc-build/src/client.rs b/poem-grpc-build/src/client.rs
index 391e41ad88..a27fea099f 100644
--- a/poem-grpc-build/src/client.rs
+++ b/poem-grpc-build/src/client.rs
@@ -22,7 +22,7 @@ pub(crate) fn generate(config: &GrpcConfig, service: &Service, buf: &mut String)
         let name = format_ident!("{}", method.name);
         let input_type = syn::parse_str::<Type>(&method.input_type).unwrap();
         let output_type = syn::parse_str::<Type>(&method.output_type).unwrap();
-        let path = if !config.emit_package {
+        let path = if !config.emit_package && !service.package.is_empty() {
             format!(
                 "/{}.{}/{}",
                 service.package, service.proto_name, method.proto_name
diff --git a/poem-grpc-build/src/server.rs b/poem-grpc-build/src/server.rs
index 9326e266ad..73e5cde804 100644
--- a/poem-grpc-build/src/server.rs
+++ b/poem-grpc-build/src/server.rs
@@ -36,7 +36,7 @@ pub(crate) fn generate(config: &GrpcConfig, service: &Service, buf: &mut String)
         })
         .collect::<Vec<_>>();
     let crate_name = get_crate_name(config.internal);
-    let service_name = if !config.emit_package {
+    let service_name = if !config.emit_package && !service.package.is_empty() {
         format!("{}.{}", service.package, service.proto_name)
     } else {
         service.proto_name.clone()


Test patch: