-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
System.TestStructs ships with Micrososoft.Extensions.DependencyInjection.Specification.Tests but builds from test directory #49069
Comments
Tagging subscribers to this area: @safern, @ViktorHofer, @Anipik Issue Details#48858 started shipping System.TestStructs. Micrososoft.Extensions.DependencyInjection.Specification.Tests is shipped to be used by 3rd party implementers of Micrososoft.Extensions.DependencyInjection in order to test their implementations. This was something done in dotnet/extensions, then dropped when we moved the source to dotnet/runtime, and brought back due to #37108 (comment) cc @maryamariyan @JunTaoLuo @eerhardt added tests to this test assembly in 21ff47c which require the System.TestStructs assembly in order to test how DI implementations handle structs which parameterized constructors. @ViktorHofer brought up some questions after we merged the PR and some issues arose around wether we should be shipping System.TestStructs as it is, or if it should be moved somewhere to better indicate that its a test assembly. For example https://github.com/dotnet/runtime/tree/main/src/libraries/Common/src or https://github.com/dotnet/runtime/tree/main/src/libraries/Common/tests. We might also consider if we want to change the assembly name, public key token, or anything else about how we build this or other "shipping test assemblies". This issue aims to gather concensus on these questions. Those mentioned, please weigh in.
|
The test added in 21ff47c did find a behavioral difference in Unity DI container: unitycontainer/microsoft-dependency-injection#87. So it seems like a valuable test. Note that once the C# feature comes in which allows parameterless constructors on structs, we can remove the dependency on the TestStructs assembly and just create one in the test assembly. |
Is that a NET6 deliverable? If yes then I'm fine to wait, otherwise I would prefer to address this issue sooner. |
According to https://github.com/dotnet/roslyn/blob/master/docs/Language%20Feature%20Status.md#c-next, it is currently in progress. @cston @jcouv @333fred could answer if parameterless struct constructors will make it for NET6. |
Chuck is working on them. I would expect that they should make it. |
@eerhardt in this case do you want to remove this test for now until we have the language feature? |
Commenting out this test until the C# language feature is implemented. This allows us to ship the DI Specification tests without shipping the TestStructs project. Contributes to dotnet#49069
Commenting out this test until the C# language feature is implemented. This allows us to ship the DI Specification tests without shipping the TestStructs project. Contributes to #49069
Closing as mitigated with b0ba53a. |
#48858 started shipping System.TestStructs.
Micrososoft.Extensions.DependencyInjection.Specification.Tests is shipped to be used by 3rd party implementers of Micrososoft.Extensions.DependencyInjection in order to test their implementations. This was something done in dotnet/extensions, then dropped when we moved the source to dotnet/runtime, and brought back due to #37108 (comment) cc @maryamariyan @JunTaoLuo
@eerhardt added tests to this test assembly in 21ff47c which require the System.TestStructs assembly in order to test how DI implementations handle structs with parameterless constructors.
@ViktorHofer brought up some questions after we merged the PR and some issues arose around wether we should be shipping System.TestStructs as it is, or if it should be moved somewhere to better indicate that its a test assembly. For example https://github.com/dotnet/runtime/tree/main/src/libraries/Common/src or https://github.com/dotnet/runtime/tree/main/src/libraries/Common/tests.
We might also consider if we want to change the assembly name, public key token, or anything else about how we build this or other "shipping test assemblies".
This issue aims to gather concensus on these questions. Those mentioned, please weigh in.
The text was updated successfully, but these errors were encountered: