-
Notifications
You must be signed in to change notification settings - Fork 10.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
[Discussion] Making "pubinternal" types in MVC internal #4932
Comments
Is that an autocompletion problem? What about hiding through |
cc @khellang and @poke since you were involved in the discussion in the PR I sent out earlier. Here are some of the more specific reasons why we're considering doing this:
A library such as FluentValidation which uses the first type is now using an unsupported API in a primary scenario. Libraries using In 2.1.0 we started using an analyzer to flag these kinds of incorrect usages. However this limits the utility for
|
Is this decision limited to MVC or have there been discussions about doing something similar for EF Core? (asking because we currently have tools that use some pubinternal EF types because they are really useful for doing weird things and saved us a lot of time - but we fully accept that there is no support policy or API stability whatsoever) |
@Sebazzz that's an idea that I hadn't considered and it would certainly help in accidental use. That said, it doesn't help with our servicing patch story which is one of the primary reasons we want to consider moving away from it's use. @dasMulli, this is limited to the MVC repo. We had an internal discussion about this and the EF Core team was happy with their current use of pub internal types. |
@sebastienros are we affected?? |
No, it's taken care of |
I see both sides but ultimately prefer y'all being able to move forward with confidence. It has been very nice in a few rare cases to just depend on a .Internal type instead of having to find the source code for it and copy-paste to reproduce the same outcome. In the future when I need to do that I will open an issue suggesting that an internal class be promoted to public. Thank you for announcing this. |
A while ago I wrote some code that allowed Kestrel to be started up without ASP.NET. I did it because I was curious to know if it could be done, and the answer seems to be yes, but unless I've missed something you need Standalone Kestrel seems potentially useful. It uses less memory than the normal setup, and might be appropriate when someone is using HTTP as a transport, but not writing a website. I should add that if these APIs go away, you won't actually break anything for me. I never took it any further precisely because I would be depending on Edit: Posting this made me look at the problem again, and I've been able to rewrite it to avoid using any |
@PeteX we're specifically changing types in the namespaces listed above. Neither of the namespaces you listed above are affected by this particular change \ announcement. |
It'd be nice to see some more specific info on things you might be considering exposing as public. Stuff we've used in various ways in one manner or another that I can see include things like...
Most of this stuff is right in |
@tillig my current plan was to only make
|
I'm not sure that narrows it down. For example, looking at the Anyway, it'd be potentially much easier to have a discussion if there was some sort of list of candidates that will move to be internal or a list of candidates to keep public. I recognize that's possibly a long list, but it's really hard to look through a codebase for usages or hypothesize use cases for things if we don't really know what we're looking for. |
@tillig that's a fairly long list. As part of making types in the That said, I'm happy for you to join to the feedback and identify types that may be of interest to you. I'll make sure to loop you in in PRs to other assemblies. Additionally, I'm using aspnet/Mvc#8694 to review previously |
|
We periodically close 'discussion' issues that have not been updated in a long period of time. We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate. |
In ASP.NET Core,
pubinternal
types are types that are declared aspublic
but put in an.Internal
namespace. While these types are public they have no support policy and are subject to breaking changes. Unfortunately accidental use of these types has been common, resulting in breaking changes to these projects and limiting our ability to maintain the framework.In ASP.NET Core 3.0, we are updating all
pubinternal
types in MVC to either bepublic
in a supported namespace, orinternal
as appropriate. This includes types in the following namespaces:If there are specific types in these namespaces that are critical to your applications, please file an issue in https://github.com/aspnet/Mvc and we will consider making the requested types public.
The text was updated successfully, but these errors were encountered: