-
Notifications
You must be signed in to change notification settings - Fork 560
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
dotnet-svcutil test update: remove unsupported .net version tests and… #5042
Conversation
… fixing baselines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- please documents all the changes in the description to make this PR clear
- does it make sense to separate the CloseAsync in a separate PR?
- I see making the version generic is more dangerous than the gain, particularly in the type reuse side, what do you think? I would suggest to make this PR purely remove the old non-supported framework PR. We could rethink about the future, whether to make it generic or not.
- I also think we need to throw an error message when the targeted app is on non-supported target framework.
@@ -25,8 +25,8 @@ | |||
</PropertyGroup> | |||
|
|||
<PropertyGroup> | |||
<ScenarioTestTargetFrameworks>net6.0;net7.0</ScenarioTestTargetFrameworks> | |||
<UnitTestTargetFrameworks>net6.0;net7.0</UnitTestTargetFrameworks> | |||
<ScenarioTestTargetFrameworks>net6.0;net8.0</ScenarioTestTargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why drop net7.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to upgrade net7.0 to net8.0 to accommodate the .net sdk and runtime definitions in https://github.com/dotnet/wcf/blob/main/global.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this setting only affects WCF tests, not dotnet-svcutil tests. So it's not changed in the newly created separated PR.
@@ -889,11 +889,6 @@ public virtual System.Threading.Tasks.Task OpenAsync() | |||
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); | |||
} | |||
|
|||
public virtual System.Threading.Tasks.Task CloseAsync() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any risk of removing this? Should another test be added?
In addition, can you please put a summary of all changes as it will make it easier to understand the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test baselines are updated for changes of PR #4909 (issue #4891), dotnet-svcutil no longer generate CloseAsync() when the referenced wcf package version equals or greater than 4.10.
The risk here is we missed testing the tool running in projects with different .net targets, it is due to the limitation of .net defined in global.json under the repository root. We do cover this scenario in manual testing, specifically, verifying that when the test project references wcf packages older than 4.10.*, the CloseAysnc() still get generated.
@@ -3,6 +3,8 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>N.N</TargetFramework> | |||
<ImplicitUsings>enable</ImplicitUsings> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we still support coreapp2.0 when we are deleting netcoreapp3.1?
@@ -1,18 +1,18 @@ | |||
{ | |||
"providerId": "TFnet5_0", | |||
"providerId": "_edb", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use 6.0 to replace 5.0? Is _edb defined somewhere, I might have missed it>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this part of this change? From the name, sound like this is used for net6.0? Is that not the case?
@@ -7,12 +7,12 @@ | |||
// </auto-generated> | |||
//------------------------------------------------------------------------------ | |||
|
|||
namespace TypeReuse60_NS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you are making this generic. How does this impact combability?
In addition, perhaps we should throw an erro message when working with version less than 5.0, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does generic will make it work with all versions of target Framework? We do need to think about this.
[System.ServiceModel.FaultContractAttribute(typeof(NetHttps_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] | ||
[System.ServiceModel.FaultContractAttribute(typeof(NetHttps_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault2", Name="FaultDetail2", Namespace="http://www.contoso.com/wcfnamespace")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I am not sure I know what this is for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In generated code, the attributes' order is different than originally generated, looks relate to CodeDom other than bug from the tool.
@@ -204,12 +201,12 @@ public void NamespaceParam(string testCaseName, string options, bool expectSucce | |||
|
|||
[Trait("Category", "BVT")] | |||
[Theory] | |||
[InlineData("TypeReuse60", "net6.0")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than use a generic format, I do prefer to add net7.0 and net 8.0 here to make it explicitly clear. However, I do see your point that we don't need to update this in the future. Similar to another comment before, does this mean we also allow other earlier .net versions? We do need to be careful here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format is made generic because the .net version is actually not used at all in the test, in the case context it always creates a test.csproj targets to the latest .net version (currently it's net8.0 as defined in global.json) to test type-reuse feature.
{ | ||
this_TestCaseName = "ParamsFiles_SDK_TFM"; | ||
TestFixture(); | ||
var testCaseName = $"TF{targetFramework}".Replace(".", "_"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
Thanks for your review!
|
… fixing baselines.
To make changes of this PR clear, split it into following three:
#5050: remove CloseAsync()
#5051: remove unsupported framework targets
#5052: fix ParamsFiles and typereuse cases which hard code to net6.0