Closed mikrethor closed 3 months ago
Hey @mikrethor,
Thanks for the suggestion. There are a number of issues with the proposed solution:
CoreContext
type from addStuffInContext
makes it impossible to use Mono
or Flux
-specific fluent APIs after that call and would require casting to dhere to the return type being specific for example in a controller method.CorePublisher
and adding to the hierarchy is not a desired outcome.As far as I can see, the only trouble that you are facing is having to add 3 more lines of code that look duplicated. It's not a goal for us to optimize for less typing but for a comprehensive and performant codebase. With that, I'm sorry to reject the proposal at this time.
In my project I had to add stuff in the context and I had to duplicate the method for Mono and Flux. It would be convenient to have an interface such as CoreContext
And in Mono becomes :
And Flux :
The motivation for a developer who uses reactor would be to have :
becoming :
I could contribute it if we agree where in which package to put CoreContext (ex: reactor.core) and how to name it