You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ParamDictionaryAttribute is declared in namespace Microsoft.Scripting. However the file in which this class is defined, is Src/Microsoft.Scripting/Runtime/ParamDictionaryAttribute.cs. All other attribute classes are defined in namespaces that match their location in the directory structure (although it is not true in a general case: Src/Microsoft.Scripting/Runtime contains a few other classes that are defined in Microsoft.Scripting).
Looking at other attributes, all of them but two are defined in Microsoft.Scripting.Runtime. It seems to me that ParamDictionaryAttribute conceptually belongs to the same group. And unlike some other "misplaced" types, it is used in many places, so for instance code that uses [ParamDictionary, NotNull] has to open two namespaces.
Should ParamDictionaryAttribute be moved to namespace Microsoft.Scripting.Runtime? Can it be done without causing a breaking change?
Or maybe the .cs file should be moved one directory up? Do we care?
And in general, what are the rules of matching namespaces to directories, if any?
The text was updated successfully, but these errors were encountered:
I'm not aware of any mechanism that allows moving a type from one namespace to another without it being a breaking change (see .NET Core guidelines https://docs.microsoft.com/en-us/dotnet/core/compatibility/). Although we obviously don't need to be as strict as the BCL, I'm very reluctant to do this type of change to the DLR (whereas with ipy3 anything is fair game since it hasn't been released).
I would go with the standard .NET convention of matching the folder to the namespace. So that would mean moving it up one directory would be fine.
ParamDictionaryAttribute
is declared in namespaceMicrosoft.Scripting
. However the file in which this class is defined, isSrc/Microsoft.Scripting/Runtime/ParamDictionaryAttribute.cs
. All other attribute classes are defined in namespaces that match their location in the directory structure (although it is not true in a general case:Src/Microsoft.Scripting/Runtime
contains a few other classes that are defined inMicrosoft.Scripting
).Looking at other attributes, all of them but two are defined in
Microsoft.Scripting.Runtime
. It seems to me thatParamDictionaryAttribute
conceptually belongs to the same group. And unlike some other "misplaced" types, it is used in many places, so for instance code that uses[ParamDictionary, NotNull]
has to open two namespaces.Should
ParamDictionaryAttribute
be moved to namespaceMicrosoft.Scripting.Runtime
? Can it be done without causing a breaking change?Or maybe the
.cs
file should be moved one directory up? Do we care?And in general, what are the rules of matching namespaces to directories, if any?
The text was updated successfully, but these errors were encountered: