-
Notifications
You must be signed in to change notification settings - Fork 471
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
Reduce public API surface #389
Comments
I'm in the mood for brainstorming. How about, everything that is a conditional 'feature' of 'Core' be considered whether it is a candidate for moving out to a separate library. The list I'm thinking of is in the readme. But I cut out a few that aren't interesting... Adding some actual thoughts per interesting sounding 'feature': -FEATURE_ASSEMBLYBUILDER_SAVE (only if you separated all of DynamicProxy into its own library?) -FEATURE_BINDINGLIST (dictionary adapter cruft) -FEATURE_EVENTLOG (sounds like a natural separate standalone library) -FEATURE_LEGACY_REFLECTION_API (sounds still required for supporting .net 4.0 and older) -FEATURE_SECURITY_PERMISSIONS (I am not sure what this enables - but I never hear people talking about CAS and .net partial trust any more, and it sounds very hard to do properly, is it really being supported properly?) -FEATURE_REMOTING (not practical to remove, breaking) -FEATURE_SYSTEM_CONFIGURATION (all the config stuff could maybe be a separate library? I don't actually know if the rest of castle core depends on it etc...) |
Castle.DynamicProxy.Generators.CacheKey seems like it doesn't really need to be public... Except that it is exposed in some protected APIs etc. |
Candidates from #391: Added to list above. |
We've got 10s of classes in We've also got a few |
Another thing we might want to consider removing from the public API is |
Definitely something to consider. Regarding I think we are both in agreement that it needs to be crystal clear to users what APIs we want them using, including DP has too many entry points, this is one of the biggest reasons for me just making the required changes for bugs/CLR changes and nothing too drastic, but if we want this library to perform better (which I'd like to do more of) we are going to need to make a lot of breaking changes (and funnily most of these public APIs have no one using them). |
Just as a heads-up, I'll likely work on this next. I'll focus just on DynamicProxy's API for now. I'll try to verify all public API changes against Windsor to ensure we don't need too many changes or rewrites over there; all arguments below are made under the condition that there would be a relatively easy way to keep Windsor going.
I remember reading in some GitHub issue (cannot remember where exactly, I think it was in the CoreCLR repo) that loading a .NET assembly that was generated on a different platform/target isn't actually a supported scenario; I think the meaning of this was that if one saves a dynamic assembly on .NET 4.x, one shouldn't expect to be able to load it on .NET Core x or some other platform. (This could have to do with the plethora of "system" assemblies that are now out there, i.e. If we want to keep
I think |
With regard to DynamicProxy, we're mostly done here. The last remaining bit would have been making |
As noted in #193 (comment):
The goal of this issue is to let us keep track of which types and type members should be removed from Core's publicly visible API in the next major version (and be marked as
[Obsolete]
even before that).I suggest that we use posts for discussion and keep an up-to-date list of all decisions here at the top. If you have a better idea or format for this issue, please share!
Should be
[Obsolete]
in vNextMinor / removed from vNextMajor's public API:(A check mark means that a member is already marked
[Obsolete]
in themaster
branch.)Castle.Core.Internal.Lock
(class)Castle.Core.Internal.ILockHolder
(interface)Castle.Core.Internal.IUpgradeableLockHolder
(interface)Castle.DynamicProxy.Generators.BaseProxyGenerator.AddToCache
(method)Castle.DynamicProxy.Generators.BaseProxyGenerator.GetFromCache
(method)Castle.DynamicProxy.Generators.CacheKey
(class)Castle.DynamicProxy.Generators.DelegateProxyGenerationHook
(type)Castle.DynamicProxy.Generators.DelegateProxyGenerator
(type)Castle.DynamicProxy.Generators.Emitters.ArgumentsUtil.IsAnyByRef(ParameterInfo[])
Castle.DynamicProxy.IChangeProxyTarget.ChangeProxyTarget(object)
Castle.DynamicProxy.Internal.InternalsUtil
Castle.DynamicProxy.Internal.InternalsUtil.IsAccessible(this MethodBase)
Castle.DynamicProxy.Internal.InternalsUtil.IsInternal(this MethodBase)
Castle.DynamicProxy.Internal.InternalsUtil.IsInternalToDynamicProxy(this Assembly)
Castle.DynamicProxy.ModuleScope.DefineType
(method)Castle.DynamicProxy.ModuleScope.GetFromCache
(method)Castle.DynamicProxy.ModuleScope.Lock
(property)Castle.DynamicProxy.ModuleScope.RegisterInCache
(method)Castle.DynamicProxy.Serialization.CacheMappingsAttribute.GetDeserializedMappings
(method)Castle.DynamicProxy.Serialization.CacheMappingsAttribute.ApplyTo
(method)The text was updated successfully, but these errors were encountered: