Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple services in gRPC extension #304 #317

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joshuapassos
Copy link

@joshuapassos joshuapassos commented Sep 26, 2021

When use use_grpc a lot of times, the configureApp is added more times in appConfig making multiples sercices dont work corretly.

Now configureApp is inserted only once.

Fix #304

@joshuapassos joshuapassos changed the title Fix #304 Fix multiples services in gRPC extension #304 Sep 26, 2021
@joshuapassos joshuapassos changed the title Fix multiples services in gRPC extension #304 Fix multiple services in gRPC extension #304 Sep 26, 2021
@@ -21,6 +21,6 @@ type Saturn.Application.ApplicationBuilder with
app.UseEndpoints (fun endpoints -> endpoints.MapGrpcService<'a>() |> ignore)

{ state with
AppConfigs = configureApp::configureGrpcEndpoint::state.AppConfigs
AppConfigs = configureApp::configureGrpcEndpoint::state.AppConfigs.[1.. state.AppConfigs.Length]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds risky - as far as I understand it'd potentially break if the use_grpc calls were not in a row.

For example, if I had in my application following code it would remove the wrong entry in state.AppConfigs:

use_grpc MyHelloWithDI
use_static
use_grpc MyCalculatorWithDI

TBF, I'm not yet sure what's the good solution here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use_grpc does not work with multiples services
2 participants