-
Notifications
You must be signed in to change notification settings - Fork 15.8k
[C#] Update .NET SDKs to LTS versions #9205
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
[C#] Update .NET SDKs to LTS versions #9205
Conversation
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.
Thanks! LGTM once the tests are green.
It failed because of a conformance test:
The Double.Parse method from .NET is used to parse doubles from JSON. With .NET Core 3.1 and greater, the small value which is expected to fail is now supported. Ignore the error? Or add additional logic to Protobuf's double parsing to explicitly fail this small value? |
Looks like we are seeing the failure to do e.g.
I'm wondering why it's only complaining about the nuget source "Microsoft Visual Studio Offline Packages". Are the nuget sources somehow misconfigured so that download from nuget.org is never attempted? |
This is odd. How can Double.Parse suddenly succeed with too small input value in .NET Core 3+?
|
Per docs OverflowException is thrown by Double.parse in "NET Framework and .NET Core 2.2 and earlier versions only" so something has indeed changed. I'm not sure what. |
OK, looks like it now returns +/- Inf in these cases. |
"In .NET Core 3.0 and later, values that are too large to represent are rounded to PositiveInfinity or NegativeInfinity as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure." |
This is going to be tricky. We might not want to simply accept the infinity values. We might instead want to check for them explicitly and then fail like we used to in 2.1 and earlier. |
The simple solution could be to throw if |
I don't know. Perhaps something has changed in newer SDKs to require a package source to be explicitly configured? I added a nuget.org file to this PR to explicitly configure nuget.org as a source. |
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.
LGTM, thanks for taking care of this.
Updates SDKs:
Also fixes inconsistency in parsing out-of-range double values in JSON format.