-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Internal types that need to be made public (EFCore.PG, preview7) #16733
Comments
@roji
|
But ExpressionPrinter (which is public) exposes it as its StringBuilder property, and that's the only way to actually print stuff on it :) |
We can also hide |
Sure, whatever allows providers to generate SQL. I wasn't in the discussions on keeping IndentedStringBuilder internal, but in some cases I suspect expressions would need to be printed multiple lines and hence indents. If we end up exposing significant functionality from IndentedStringBuilder on ExpressionPrinter it may make more sense to just expose it instead... IndentedStringBuilder also doesn't seem to be that big or a large potential for breakage, so I'd just consider making it public. But no strong feelings on my side, whatever you choose that allows providers to work is fine. |
I wasn't aware of discussion either. The way I see it, IndentedStringBuilder is implementation detail. If it is being used outside of ExpressionPrinter then sure it could be make public. But if it is exclusively being used for it then it should remain hidden. RelationalCommandBuilder already follows the pattern and only exposes the methods rather than builder itself. If that is not causing any issue then I don't see why ExpressionPrinter should be any different. |
I don't see a big difference between the two options and have no real preference. |
We don't want to make it public because it's a general-purpose useful class that isn't directly related to EF. Historically, people have taken dependencies on EF only to use classes like this, which then results in very different kinds of support requests. It's the same reason a bunch of our extension methods are real-internal. |
OK then, should I submit a PR to expose the relevant functionality on ExpressionPrinter? |
@roji That makes sense to me. |
@roji Any updates on this following the move to current bits? |
Nope - all good. I think we still have to make RelationalEvaluatableExpressionFilter public though - should I do that? |
Let's discuss with @smitpatel in triage. |
Yes, make it public. Providers need to derive from that. |
Closing as everything covered by this has been made public. |
Here are EFCore.PG's dependencies on internal EF stuff at preview7.
Need to be done:
Already done in master:
The text was updated successfully, but these errors were encountered: