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

Remaining pubternal APIs in the shared framework #11312

Closed
13 of 14 tasks
davidfowl opened this issue Jun 18, 2019 · 23 comments
Closed
13 of 14 tasks

Remaining pubternal APIs in the shared framework #11312

davidfowl opened this issue Jun 18, 2019 · 23 comments
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-platform Deprecated: Cross-cutting issues related to ASP.NET Core as a platform

Comments

@natemcmaster
Copy link
Contributor

For DataProtection, see #6975 (comment). It's the only context I have on that one.

@pranavkm
Copy link
Contributor

@HaoK
Copy link
Member

HaoK commented Jun 18, 2019

For auth, it looks like we only have one RequestPathBaseCookieBuilder class which seems harmless enough to make public along side the rest of the Authentication Core code. Its shared between Cookies, OpenIdConnect and the base RemoteAuthentication classes.

@Tratcher any opposition to just making this regular public? This class hasn't been touched since @natemcmaster added this 2 years ago when he introduced the cookie builder stuff.

@davidfowl
Copy link
Member Author

The Mvc.Core.Infrastructure is rather unfortunate. It's still there in 3.0: https://github.com/aspnet/AspNetCore/blob/master/src/Mvc/Mvc.Core/src/Infrastructure/IAntiforgeryValidationFailedResult.cs

@pranavkm Why not move it out of the internal namespace?

@davidfowl
Copy link
Member Author

davidfowl commented Jun 18, 2019

For DataProtection, see #6975 (comment). It's the only context I have on that one.

@blowdart besides "leave DataProtection alone", do you know if we can make this type internal now or make it properly public? There are 2 types:

public class DataProtectionBuilder : IDataProtectionBuilder {
         public DataProtectionBuilder(IServiceCollection services);
         public IServiceCollection Services { get; }
     }

This could be public or internal.

public interface IActivator {
    object CreateInstance(Type expectedBaseType, string implementationTypeName);
}

This should be internal.

@blowdart
Copy link
Contributor

Why should it be internal?

@GrabYourPitchforks can you remember why this was written in this way?

@Tratcher
Copy link
Member

@HaoK Yes, RequestPathBaseCookieBuilder can be public.

@Tratcher
Copy link
Member

For sanity sake, let there only be one breaking change announcement that we add a few comments to.

@davidfowl
Copy link
Member Author

Why should it be internal?

It's a utility interface that's an internal implementation detail that doesn't need to be exposed to external users. We're doing mass clean up of pubternal types in ASP.NET Core 3.0, data protection is part of that clean up.

@davidfowl
Copy link
Member Author

@pranavkm All of the Razor.Internal ones are runtime compilation specific. We made specific announcements for it.

Can we move the code gen helpers to a CompilerServices namespace?

@Pilchie Pilchie added the feature-platform Deprecated: Cross-cutting issues related to ASP.NET Core as a platform label Jun 19, 2019
@pranavkm
Copy link
Contributor

Can we move the code gen helpers to a CompilerServices namespace?

Not super sure I follow. Are you talking about CSharpCompiler? For a lot of the others, the actual interface types are still public, as a rule MVC does not expose the actual implementation type.

@davidfowl
Copy link
Member Author

Not super sure I follow. Are you talking about CSharpCompiler? For a lot of the others, the actual interface types are still public, as a rule MVC does not expose the actual implementation type.

No, the types in Razor.Internal, like RazorInject attribute and the other things you said are required for code generation.

@pranavkm
Copy link
Contributor

We decided to leave RazorInject in the pubinternal namespace. We wanted to avoid breaking 2.2 RCLs with generated content. We're treating it as part of our public API surface even though it's in the .Internal namespace.

@davidfowl
Copy link
Member Author

We're making great progress on this!

@davidfowl
Copy link
Member Author

@Tratcher can you look at Microsoft.AspNetCore.Server.Kestrel.Https.Internal?
@rynowak can you make a call on the types in ** Microsoft.AspNetCore.Routing.Internal** - You can leave make DfaWriter as public API with a comment about the fact it can break (similar to how EF has the warning on pubternal types)
I'll take Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http, this is the http parser we use in the platform benchmark.
@blowdart Microsoft.AspNetCore.DataProtection.Internal - I'm going to look at making things internal.

@davidfowl
Copy link
Member Author

@GrabYourPitchforks Do you have any feedback on making Microsoft.AspNetCore.DataProtection.Internal and Microsoft.AspNetCore.DataProtection.Cng.Internal actually internal?

@rynowak
Copy link
Member

rynowak commented Jul 1, 2019

#11752

@davidfowl
Copy link
Member Author

Spoke to @GrabYourPitchforks and he says make them internal!

@NicolasDorier
Copy link

EnableRewind is quite useful, why was it removed?

@Tratcher
Copy link
Member

Tratcher commented Aug 6, 2019

@NicolasDorier because we made a properly public version named EnableBuffering.

@NicolasDorier
Copy link

Just another feedback:

I was using AnsiLogConsole/WindowsLogConsole/IConsole directly in the past as I did a custom CustomConsoleLogger, which is almost the same as the official one but with little adjustment. I have a bad memory about the initial reason, I think it is because I only wanted [Info] and nothing more in my logs. (No timestamp) and some custom stuff with log padding.

Since Internal namespace is now internal, my code broke.

I don't think it is a big deal really, as I can just copy/paste those classes directly in my project. It is quite corner case and does not require me too much maintenance. Just wanted to share feedback.

@Samirat
Copy link

Samirat commented Nov 4, 2019

@Tratcher @davidfowl Can RequestCookieCollection be public? If implementing a custom IRequestCookieCollection or IRequestCookieFeature, there's not much reason to reimplement this vs inherit or wrap it.

I think you can get an instance of one anyway like this:
(new RequestCookiesFeature(new FeatureCollection())).Cookies;

@analogrelay
Copy link
Contributor

@Samirat can you file a new issue for API requests like this?

I'm going to close this as we've finished the work on removing pubternal APIs. Feel free to open new issues to discuss particular APIs. We can triage those as appropriate.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-platform Deprecated: Cross-cutting issues related to ASP.NET Core as a platform
Projects
None yet
Development

No branches or pull requests